Page 1 of 1

huddraw

Posted: Mon May 16, 2005 10:02 am
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 

}

Posted: Mon May 16, 2005 11:37 am
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))

Posted: Mon May 16, 2005 12:19 pm
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.