1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

How to make a HUD mutator

Discussion in 'CHiMERiC' started by KillerMonk, Feb 1, 2002.

  1. KillerMonk

    KillerMonk UScript and VC++ Master Mind

    Joined:
    Jan 9, 2002
    Messages:
    48
    Likes Received:
    0
    well, more how can I add it without making a new game type. It was done with the team beacon mutator, but that just draws little icons, I'm wondering how I could change the whole HUD w/o having to create a whole new game type...
     
  2. arcanex

    arcanex teh grinning totem

    Joined:
    Sep 28, 2001
    Messages:
    123
    Likes Received:
    0
    I don't think you can change the default HUD with just a mutator, all you can do is add to it through PostRender() functions.
     
  3. Lemoni

    Lemoni The Philosapher

    Joined:
    Feb 17, 2001
    Messages:
    628
    Likes Received:
    0
    just make the game type, it easer to under stand the functions for the hud if u do, i did an split (with - signs) the challeng hud up so i could understand it
     
  4. KillerMonk

    KillerMonk UScript and VC++ Master Mind

    Joined:
    Jan 9, 2002
    Messages:
    48
    Likes Received:
    0
    Could I make a mutator to change gametypes? That way it won't spam up the Gametype list...
     
  5. Captain Kewl

    Captain Kewl I know kewl.

    Joined:
    Feb 13, 2001
    Messages:
    794
    Likes Received:
    0
    Sure it's possible to change the HUD. Use ModifyPlayer to change PlayerPawn(Other).myHUD. Unclean programming, but it works. :)

    I think it might also be possible to replace the HUD in a SpawnNotify, though my attempts to do so crashed UT. Though at the time I didn't really understand what I was doing, so it may yet be possible.
     
  6. |FAST|_Chimp

    |FAST|_Chimp Col. Mustard

    Joined:
    Mar 5, 2002
    Messages:
    6
    Likes Received:
    0
    This is my code written from tutorial by Druken Master ascholer@mediaone.net... You'll get the idea...

    create mutator:
    class scpHudScore extends Mutator;

    var bool gbInitDone;

    function PreBeginPlay()
    {
    if (gbInitDone) return;
    gbInitDone = True;
    spawn(class'scpHudScore.scpHudScoreNotify');
    }

    Create the spawn notify:
    class scpHudScoreNotify extends SpawnNotify;

    simulated event Actor SpawnNotification( Actor loActor )
    {

    if ( HUD(loActor).HUDMutator == none)
    {
    HUD(loActor).HUDMutator = spawn(class'scpHudScore.scpHudScoreHud',loActor);
    }
    else
    {
    HUD(loActor).HUDMutator.AddMutator(spawn(class'scpHudScore.scpHudScoreHud',loActor));
    }
    return loActor;

    }
    defaultproperties
    {
    ActorClass=class'Engine.HUD';
    }


    create the hud:
    class scpHudScoreHud extends Mutator;
    simulated function PostRender (canvas loCanvas)
    {

    loCanvas.SetPos(30,50);
    loCanvas.DrawText("my text");
    }
     

Share This Page