huddraw

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

huddraw

Post by lizardkid »

man i hate this thing, it's the worst designed function ever to curse Q3. GRRR..

What i'm trying to do it draw on a bunch of AI's health values and if they're dead put out ared DEAD where their health would be.

yeah, ambitious for one having never dealt with this idiotic function before.

so far, i've managed to get the thing where i want it and change the color and the message, but i don't know how to do:

a) a dynamic message (if he's dead, print out the red letters)
b) the health PERIOD, i try it like an iprintln it tells me wrong arguments, i try it like 2 arguments it tells me wrong arguments, how the f*** am i supposed to do this?

Code: Select all

while(level.squadIsCommandable == TRUE)
{
   huddraw_rect 187 340 184 50 50
   huddraw_color 187 0 0 1
   huddraw_font 187 "facfont-20" 
   huddraw_string 187 "Guy 1's health: "
   huddraw_align 187 bottom right 
   huddraw_alpha 187 1 

   wait .5 //refresh rate 

}
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

huddraw_string 187 ("Guy 1's health: " + $guy1.health)

Or, if you want it without the 3 decimals:

huddraw_string 187 ("Guy 1's health: " + (int $guy1.health))
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

I find huddraw very useful, too bad you can't huddraw to single players.

If you want some other text to be printed in some other colour, you need to make another huddraw element.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply