Results 1 to 10 of 20

Thread: [Tutorial][Work in progress] Hud elements

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    So, I just made this today, it is a very basic hud based on eXtreme+ (only thing is, this is much more simple).
    This is for displaying kill streak messages as images instead of strings with iprintlnBold.
    I'm not sure if there are any errors, since it's the first hud I ever wrote, but it works fine.

    I hope it helps anybody who's looking for help.

    Do not forget to precache your shaders. Do it in Callback_StartGameType():
    Code:
    precacheShader("your_shader");
    PHP Code:
    displayShader(shadersizedurationattacker)
    {
        
    shaderhud newClientHudElem(attacker);
        
    shaderhud.vertAlign "subtop";
        
    shaderhud.horzAlign "center";
        
    shaderhud.size*(-0.5);
        
    shaderhud.size*(0.5);

        
    shaderhud.alpha 0;
        
    shaderhud setShader(shadersizesize);
        
    shaderhud.alpha 1;

        
    wait(duration);

        
    shaderhud fadeOverTime(1);
        
    shaderhud.alpha 0;
        
    wait(1);

        
    shaderhud destroy();

    Where, naturally, shader is the name of your shader (string), size is the size, duration is the duration before it starts to fade and attacker is the player receiving the new hud.



    added info that was here to first post - izno
    Last edited by IzNoGoD; 15th September 2014 at 10:34.

  2. The Following User Says Thank You to guiismiti For This Useful Post:

    pollo (15th September 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •