Page 2 of 3

Posted: Sun Apr 18, 2004 11:28 am
by bdbodger
Well I deleted it after I tested it so can't say but seems strange that it didn't work right away I just cut and pasted it after I seen that it worked hmm oh well if you got it to work then good for you .

Posted: Sun Apr 18, 2004 5:42 pm
by Cobra {sfx}
Loverly work guys, on screen and countin down :)

Ta mucho for all yer help!

ive connected it to the trigger so when u recieve jetpack it threads from the to the hudmenu, works a treat, all i gotta do now is decide how much flight time to give em and disable their low gravity when it runs out, doesnt sound too hard :P

Cobra

(very happy)

ps is there a way to give them more speed in flight and less on ground if carrying it?

run speed

Posted: Sun Apr 18, 2004 7:51 pm
by tltrude
It would be "run speed", but I don't know how to adjust it.

Posted: Sun Apr 18, 2004 8:01 pm
by Cobra {sfx}
yeh your right tom, runspeed.

Heres summat unusual ... i put the mod serverside but the new hud dont show yet it does on my network, anyway i can fix that?

Also got the fuel counter (on network) when it runs out to kill the grav so thats perfect :)

all good fun

Cobra

URC

Posted: Mon Apr 19, 2004 8:30 am
by tltrude
I guess the clients would need to have the new .urc file to see it.

Posted: Tue Apr 20, 2004 2:19 pm
by Cobra {sfx}
Ok i tried incooperating the first one with part of the second one now im getting lost lol, can anyone fix this...

hudtest:

level.Fuel = 60
wait 2
showmenu myFuelbar

while(level.Fuel > 0)
{
setcvar Fuelbar level.Fuelbar
wait 1
level.Fuelbar--
while (1)

waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" .75 .65 .1 )) // three numbers are for color (gold)
}
waitframe
end

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

wait .5 //refresh time




hidemenu myFuelbar

it runs from a trigger thread (or should lol)

but i think ive messed it up

(just need that countdown timer on screen in text)

Cobra

one problem

Posted: Tue Apr 20, 2004 2:45 pm
by tltrude
Count your brackets in this line.

waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" .75 .65 .1 ))

Posted: Tue Apr 20, 2004 3:13 pm
by Cobra {sfx}
Ok i fixed that but now i get an error in console - bad token .75
think thats all thats stoppin it now

Cobra

waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" )) .75 .65 .1

fixed the first bad token now it says bad token right?
summat to do with the .75 .65 .1

waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" .75 .65 .1 )) //tried that = nope

waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" .75 .65 .1 ) //tried that = nope

i just get token ererors

argh its close unless something is missing?

Posted: Tue Apr 20, 2004 4:21 pm
by tltrude
Try it this way.

waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" ) .75 .65 .1

Posted: Wed Apr 21, 2004 5:49 am
by Cobra {sfx}
Close ... went 60 - 59 - stayed on 59 and gravity reset prematurely.
also displayed countdown with fuel on screen, nearly there :P

Ill mess around when i get up (just finished 12 hr nights :(

Cobra

thanks for your help tom, yer a good un ;)

ps - i have msn that the 3d jetpack model is ready,
now thats gonna be fun sortin lol

Posted: Wed Apr 21, 2004 5:57 am
by bdbodger
while(level.Fuel > 0)
{
setcvar Fuelbar level.Fuelbar
wait 1
level.Fuelbar--
while (1)
which is it level.fuel or level.fuelbar ?

Posted: Wed Apr 21, 2004 6:20 am
by Cobra {sfx}
Ah well spotted Bodger, ok i renamed em all to fuel, i still get the same thing ...

60 - 59 - stayed on 59 and gravity reset prematurely.
also displayed countdown with fuel on screen..
(on screen)=Countdown:Fuel 60
(on screen)=Countdown:Fuel 59

baffled :P

Cobra

graphics and text

Posted: Wed Apr 21, 2004 8:50 am
by tltrude
Well you are mixing up the graphic and text displays by using the same variable names for both. The text display does not need cvars.

Posted: Wed Apr 21, 2004 1:03 pm
by Cobra {sfx}
Grrr

All i need is an onscreen countdown (Fuel readout) from 60, this is triggered upon em getting a jetpack, ive tried god knows how many combos of this and gettin nowhere :(

it either doesnt show up or shows up, stops at 59 and stays there.

Dont matter, ive wasted about 3 days messin with that ill give up on it and do summat else.

Posted: Wed Apr 21, 2004 11:20 pm
by bdbodger
Maybe try this

Code: Select all

hudtest: 

level.Fuel = 60 
wait 2 
showmenu myFuelbar 

huddraw_rect 187 140 -84 50 50 
huddraw_color 187 .75 .65 .1 
huddraw_font 187 "facfont-20" 
huddraw_align 187 left bottom 
huddraw_alpha 187 1 

while(level.Fuel > 0) 
{ 
setcvar Fuelbar level.Fuel
huddraw_string 187 ("Countdown: " + (level.Fuelbar) + " seconds")
wait 1 
level.Fuelbar-- 
} 

hidemenu myFuelbar
huddraw_string 187 ""

end