HUD's + variables.

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » October 22nd, 2006, 11:30 pm

Hud's.

Create using "var = newHudElem()" or a client hud... "var = newClientHuDElem(self)"

Search for 'hudelem' inside the gametype gsc files, that will show you how to make the hud.

Then to update the hud values, you need 2 things...

Firstly if you want to update a text value, you must have precached the text first (and also to remove errors, localise it also) If you want just a number, it doesn't need prechached.

To store a value, use...

self.<var> = value;

for example, to get the score of a player, the game has already used self.score

Look in the gametypes files to creating a clock.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » October 23rd, 2006, 1:15 am

replace break with the word return.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests