UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

My HUD element is not appearing in game

broken avatar :(
Created 4 years ago
by mobofthedead123
0 Members and 1 Guest are viewing this topic.
596 views
broken avatar :(
×
broken avatar :(
Location: gbEngland
Date Registered: 21 December 2018
Last active: 4 years ago
Posts
13
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
mobofthedead123's Contact & Social Links
Code Snippet
cpp
function location_display_text()
{
    hint_hud = NewClientHudElem(self);
    hint_hud.fontScale = 2;
    hint_hud.alignX = "left";
    hint_hud.alignY = "top";
    hint_hud.horzAlign = "left";
    hint_hud.vertAlign = "top";
    hint_hud.x = 2;
    hint_hud.y = 2;
    text = undefined;
    while(1)
    {
        text = self get_location_text();
        hint_hud SetText( text );
        wait .1;
    }
}

function get_location_text()
{
    text = undefined;
    zone_name = undefined;
    location_text_zones = getentarray("location_text_zones","targetname");
    for( z=0; z<location_text_zones.size; z++ )
    {
        if (self IsTouching(location_text_zones[z]) )
            zone_name = location_text_zones[z].script_noteworthy;
    }

    switch( zone_name )
    {
        case "start_zone":
            text = "Communications Office";
            break;

        //case "power":
            //text = "Power Room";
            //break;

        default:
            text = "Zone Not Recognized";
            break;
    }

    return text;
}
I have added a custom script into my BO3 mod but my HUD element is not working and the text is not displaying in game. I am trying to add the location name into the top left corner like in Black Ops 4. Someone wrote this script for me and it worked perfectly in WAW but it doesn't work here in BO3. How would I change this script to make it show the text?

 
Loading ...