In Game Hud Popup?
Moderator: Moderators
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
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
Cobra
(very happy)
ps is there a way to give them more speed in flight and less on ground if carrying it?
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
Cobra
(very happy)
ps is there a way to give them more speed in flight and less on ground if carrying it?
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
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
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
Count your brackets in this line.
waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" .75 .65 .1 ))
waitthread hudprint ("Countdown: " + (level.Fuelbar) + " seconds" .75 .65 .1 ))
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
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?
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?
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
Close ... went 60 - 59 - stayed on 59 and gravity reset prematurely.
also displayed countdown with fuel on screen, nearly there
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
also displayed countdown with fuel on screen, nearly there
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
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
graphics and text
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.
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
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.
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.
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

