hey i was just wondering how to make a bar at the top of a page that says how many lives you have left in a game? thanks!
Offline
You use variables to make that.
There's probably somebody else who could explain it better. I'm not much of a game maker.
Offline
well thanks still! i really had no idea before!
Offline
what a coincidince...
auto healthbar
this may be a little fancier than what you wanted but should be pretty easy to follow and simplify
Offline
yeah but it still really helped me
Offline
You will have to create individual costumes for each health bar level and use a variable to switch between them.
when gf clicked switch to costume [health10 v] set [health v] to (10) repeat until < < (health) = (0) > or < (health) < (0) > > if <(health)=(10)> switch to costume [health10 v] end if <(health)=(9)> switch to costume [health9 v] end if <(health)=(8)> switch to costume [health8 v] end if <(health)=(7)> switch to costume [health7 v] end if <(health)=(6)> switch to costume [health6 v] end if <(health)=(5)> switch to costume [health5 v] end if <(health)=(4)> switch to costume [health4 v] end if <(health)=(3)> switch to costume [health3 v] end if <(health)=(2)> switch to costume [health2 v] end if <(health)=(1)> switch to costume [health1 v] end end when gf clicked do stuff //the game starts
Offline
I agree with programCAT. You can make ten costumes for the health sprite, it can kinda look like a battery bar, and then, you use the variables to determine what costume it should be on.
Offline
K-Jam wrote:
just use a variable
ok
Offline
CatPerson wrote:
Make
(variables)
k
Offline
ProgramCAT wrote:
You will have to create individual costumes for each health bar level and use a variable to switch between them.
when gf clicked switch to costume [health10 v] set [health v] to (10) repeat until < < (health) = (0) > or < (health) < (0) > > if <(health)=(10)> switch to costume [health10 v] end if <(health)=(9)> switch to costume [health9 v] end if <(health)=(8)> switch to costume [health8 v] end if <(health)=(7)> switch to costume [health7 v] end if <(health)=(6)> switch to costume [health6 v] end if <(health)=(5)> switch to costume [health5 v] end if <(health)=(4)> switch to costume [health4 v] end if <(health)=(3)> switch to costume [health3 v] end if <(health)=(2)> switch to costume [health2 v] end if <(health)=(1)> switch to costume [health1 v] end end when gf clicked do stuff //the game starts
wowowwwwww that looks hard but sure
Offline
Codebreaker wrote:
I agree with programCAT. You can make ten costumes for the health sprite, it can kinda look like a battery bar, and then, you use the variables to determine what costume it should be on.
ok i don't know if i should use a varible, or the health sprite thing with different costumes
Offline
this is weird this thread got like one reply before and now it's getting way more and i don't even know which to do. but thanks guys who replied
Offline