How do you make the player Lose?
ramtha
22 Dec 2005, 03:31I;m trying to make it so If the players health is Less than or equal to zero then they will lose. But I can't figure out where to do that.
DShepherd
25 Dec 2005, 06:55Well do you have a status variable for the player's health? If not you should make one, afterwhich you should make a function that run in every instance that reduces the player's health. This is where procedures come in handy.
Go into your script editing section for when your player's health is reduced, then add a conditional using "Compare two strings or values" and under string 1 put the variable for your player's health, choose under the box less than or equal to, and under string 2 put 0 or whatever it is you want your player's to die at. For actions its pretty simple, just put an end game function with losing messages.
It should look something like this:
Shouldn't be too dificult, just add in whatever else you need. 8)
Just reply asking for more if that was too complicated and I'll spend a little more time breaking it down for ya.
Go into your script editing section for when your player's health is reduced, then add a conditional using "Compare two strings or values" and under string 1 put the variable for your player's health, choose under the box less than or equal to, and under string 2 put 0 or whatever it is you want your player's to die at. For actions its pretty simple, just put an end game function with losing messages.
It should look something like this:
define procedure <LoseHealth>
if ( %PlayerHealth% <= -10 ) then playerlose
end define
Shouldn't be too dificult, just add in whatever else you need. 8)
Just reply asking for more if that was too complicated and I'll spend a little more time breaking it down for ya.
paul_one
28 Dec 2005, 12:33I have a demo created.
I can't upload/link to it at work though - so expect it around 7pm GMT.
I can't upload/link to it at work though - so expect it around 7pm GMT.