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

HUD Elements in my BO1 Custom Map

broken avatar :(
Created 4 years ago
by mobofthedead123
0 Members and 1 Guest are viewing this topic.
991 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
Hello, does anyone know how to add HUD elements through script in my BO1 custom zombies map? I want to add some text into the top right corner but I'm not sure how to go about it. Thanks.
broken avatar :(
×
broken avatar :(
Location: alDurrës
Date Registered: 6 June 2017
Last active: 9 months ago
Posts
222
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
My published cod maps:

Mansion of the Undead
Buros Der Toten
Minions by k3nt
×
klevi's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
First thread this function where you want to call the HUD. Like, if there's a specific moment in your code, add this line
Code Snippet
cpp
thread setting_up();
After you do that, add this to the bottom of the same file
Code Snippet
cpp
setting_up()
{
    players = get_players();
    array_thread(players, ::hud_function);
}
Code Snippet
cpp
hud_function()
{
    hud = create_simple_hud(self);
    hud.foreground = true;
    hud.hidewheninmenu = true;
    hud.y = 0;
    hud.x = 0;
    hud.alignX = "right";
    hud.alignY = "top";
    hud.horzAlign = "right";
    hud.vertAlign = "top";
    hud.alpha = 1;
    hud SetText("your mom for example");
}
if you're still getting an error saying 'unknow function' then add this line on the 1st row of your file
Code Snippet
cpp
#include maps\_hud_util;

Last Edit: May 05, 2022, 09:39:25 am by klevi

 
Loading ...