Forum

You must be logged in to post Login Register

Search Forums:


 






Custom Pulsing Crosshairs

No Tags
UserPost

01:18
July 26, 2012


larry

New Member

posts 2

I wanted to add a pulsing crosshair to my HUD, but after looking through the ones available, none of them worked for what I had in mind. I added a custom font and was able to get it to show up on my HUD correctly, but I can't get it to reflect my payer health like the other pulsing crosshairs do. I've tried adding it to my HudAnimaitons.txt file, but it isn't working.

What specifically do I need to do in order to get a custom crosshair to work like the pulsing crosshairs and change color based on my health?

09:37
July 27, 2012


Garm3n

Admin

posts 113

Let's see what i have done with xHairNormalPulse.

1. Add the font symbol.ttf to the resource folder.
2. At the bottom of ClientScheme.res add:

        "8″
        {
            "font" "resource/symbol.ttf"
            "name" "symbol"
        }

(That's the name you see when right clicking on the font file and chooses Properties)

3. Add to ClientScheme.res:

        "xHairNormalPulse"
        {
            "1″
            {
                "name"        "Symbol"
                "tall"        "28″
                "weight"    "0″
                "additive"    "0″
                "outline" "1″
            }
        }

That decides what the name of the font will be, in this case "xHairNormalPulse" (You'll get the "name" (Symbol) by just open the font file and looking at top left)

4. Add the following into HudPlayerHealth.res:

    xHairNormalPulse
    {
        "controlName"    "CExLabel"
        "fieldName"         "xHairNormalPulse"
        "visible"        "1″
        "enabled"        "1″
        "zpos"            "1″

        "xpos"            "c-12″
        "ypos"            "r255″
        "wide"            "25″
        "tall"            "25″

        "font"            "xHairNormalPulse"
        "labelText"        "+"
        "fgcolor"        "255 255 255 255″
        "textAlignment"    "center"
    }

5. Go to scripts / HudAnimations_tf.
6. Under //event HudHealthBonusPulse add:

Animate    xHairNormalPulse             FgColor        "0 175 255 255″        Linear 0.0 0.0

7. Under event HudHealthBonusPulseStop add:

StopPanelAnimations xHairNormalPulse 0.0
Animate xHairNormalPulse             FgColor        "255 255 255 255″        Linear 0.0 0.0

8. Under event HudHealthDyingPulse add:

Animate xHairNormalPulse             FgColor        "255 0 0 255″        Linear 0.0 0.0

9. Under event HudHealthDyingPulseStop add:

StopPanelAnimations xHairNormalPulse 0.0
Animate xHairNormalPulse             FgColor        "255 255 255 255″        Linear 0.0 0.0

Hope you get it.

12:12
July 27, 2012


larry

New Member

posts 2

Awesome, thanks. I already had everything in the animations file correct, The problem I was having was that I wasn't using the fieldname, but instead was using the name of the crosshair. Now that i've fixed that it's working great!

13:40
July 27, 2012


Garm3n

Admin

posts 113

Awesome, my pleasure.

21:34
May 15, 2013


Muffy

New Member

posts 1

Hey, tell me please what i should copy to using xHairCirclePulse in my hud?

For now Garmen Hud using a lot of fonts, i need pulsing circle, thanks.

12:52
May 16, 2013


Garm3n

Admin

posts 113

Hi,

1. resource / FORMASGE.TTF

2. resource / ClientScheme / copy and paste at the bottom (change "10″ to the right number for you):

        "10″
        {
            "font" "resource/FORMASGE.TTF"
            "name" "FORMASGE"
        }

3. resource / ClientScheme.res / copy and paste where you have your font section:

        "xHairCirclePulse"
        {
            "1″
            {
                "name"        "Formas germetricas 1″
                "tall"        "30″
                "weight"    "0″
                "antialias"    "1″
            }
        }

4. resource / ui / HudPlayerHealth.res / copy and paste:

    "xHairCirclePulse"
    {
        "controlName"    "CExLabel"
        "fieldName"         "xHairCirclePulse"
        "visible"        "1″
        "enabled"        "1″
        "zpos"            "2″

        "xpos"            "c-17″
        "ypos"            "r256″
        "wide"            "34″
        "tall"            "32″

        "font"            "xHairCirclePulse"
        "labelText"        "i"
        "textAlignment"    "center"    
        
        "fgcolor"        "255 255 255 255″
    }

change "xpos" and "ypos" so it fits your resolution.

5. scripts / HudAnimations_tf / under event HudHealthBonusPulse copy and paste:

    Animate    xHairCirclePulse             FgColor        "0 175 255 255″        Linear 0.0 0.0

6. scripts / HudAnimations_tf / under event HudHealthBonusPulseStop copy and paste:

        StopPanelAnimations xHairCirclePulse 0.0

and:

    Animate xHairCirclePulse             FgColor        "255 255 255 255″        Linear 0.0 0.0

7. scripts / HudAnimations_tf / under event HudHealthDyingPulse copy and paste:

    Animate xHairCirclePulse             FgColor        "255 0 0 255″        Linear 0.0 0.0

8. scripts / HudAnimations_tf / under event HudHealthDyingPulseStop copy and paste:

    StopPanelAnimations xHairCirclePulse 0.0

and:

    Animate xHairCirclePulse             FgColor        "255 255 255 255″        Linear 0.0 0.0

9. Done

No Tags

About the SdX Gaming forum

Most Users Ever Online:

30


Currently Online:

2 Guests

Forum Stats:

Groups: 4

Forums: 11

Topics: 75

Posts: 272

Membership:

There are 294 Members

There has been 1 Guest

There are 2 Admins

There is 1 Moderator

Top Posters:

aleaf – 12

whisky – 9

zoran – 7

coskai – 5

Skepna – 5

R3Volt – 4

Administrators: Garm3n (113 Posts), Garm3n (0 Posts)

Moderators: Garm3n (113 Posts)