Page 1 of 1

hudprint

Posted: Fri May 07, 2004 5:57 am
by fuhrer
ive used a piece of a script tltrude wrote for his missile,

Code: Select all

waitthread hudprint ("players dead today:  " + (level.killcount)) .75 .65 .1

Code: Select all

hudprint local.nstring local.r local.g local.b:

   huddraw_rect 187 140 -84 50 50 
   huddraw_color 187 local.r local.g local.b 
   huddraw_font 187 "facfont-20" 
   huddraw_string 187 local.nstring 
   huddraw_align 187 left bottom 
   huddraw_alpha 187 1 

  
end 
im just wondering if anyone can explain a little bit more about what its doing, and why i cant turn it off

Posted: Fri May 07, 2004 1:56 pm
by bdbodger
huddraw_rect 187 140 -84 50 50 // this is a rectangle hud number 187 , 140 left and 84 up from the bottom because it is aligned from the bottom the 84 is a negative number it is 50 wide and 50 high

huddraw_color 187 local.r local.g local.b // this is rbg colors each rangeing from 0 to 1

huddraw_font 187 "facfont-20" // font

huddraw_string 187 local.nstring // this is the string it prints

huddraw_align 187 left bottom // alignment

huddraw_alpha 187 1 // alpha 0 to 1 so set to .5 it will be see through

local.nstring

Posted: Fri May 07, 2004 4:45 pm
by tltrude
("players dead today: " + (level.killcount)) is being sent to the hudprint thread and assigned the variable name "local.nstring". The color values are also being sent.

Can't tell why it wont shut off because you did not show the thread that "waitthread hudprint" is in. But just "thread hudprint" should make it print nothing in the same spot.

Posted: Mon May 10, 2004 1:02 am
by fuhrer
why does it print the same thing for everyone, i only want it to print onscreen for the person that triggers the trigger.

Code: Select all

level.trigerd ++
local.player[level.trigerd] = parm.other 

Code: Select all

local.player[level.trigerd] waitthread hudprint ("fuel: " + (local.player[level.trigerd].count)) .75 .65 .1
an idea but dont look like a good one

Posted: Mon May 10, 2004 3:12 am
by tltrude
Have you tried putting "local.player" or "self" ahead of each huddraw command?

"huddraw_string 187 local.nstring" is when it prints to the screen.