hudprint

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

hudprint

Post 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
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

local.nstring

Post 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.
Tom Trude,

Image
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

Post 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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post 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.
Tom Trude,

Image
Post Reply