Death
Posted: January 17th, 2010, 12:26 am
Hey. I'm currently stuck on dying.
I know it sounds funny, but I'm wondering how characters " Die " in game.
See, normally if you jump into lava or you jump off the edge of the map, you end up getting a message " Oops, you did something dangerous, press space to respawn "
So, I was wondering, what is it that "triggers" the death of the character. What code is it that tells the computer to give the death message and respawn when it jumps into lava?
I'm trying to work on a simple numbered HP. No bars or fancy colors hanging above the characters' head but a simple number HP that you can view when you press a button.
I think I have the Hp thing figured out, I'm just stuck on the " DIE " part. My code will say something like " When HP reaches 0 , " DIE " , its the DIE trigger that I need.
Anyone an help?
Thanks so much in advance.
I know it sounds funny, but I'm wondering how characters " Die " in game.
See, normally if you jump into lava or you jump off the edge of the map, you end up getting a message " Oops, you did something dangerous, press space to respawn "
So, I was wondering, what is it that "triggers" the death of the character. What code is it that tells the computer to give the death message and respawn when it jumps into lava?
I'm trying to work on a simple numbered HP. No bars or fancy colors hanging above the characters' head but a simple number HP that you can view when you press a button.
I think I have the Hp thing figured out, I'm just stuck on the " DIE " part. My code will say something like " When HP reaches 0 , " DIE " , its the DIE trigger that I need.
Anyone an help?
Thanks so much in advance.