Page 1 of 1

Death

Posted: January 17th, 2010, 12:26 am
by carter472
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.

Re: Death

Posted: June 27th, 2010, 6:09 pm
by AName
viewtopic.php?f=15&t=1382
I have a very similar question... I think what we both really want is something like:

Code: Select all

death_trigger [
  (change map code goes here)
]
but WHAT is the trigger name?!

Re: Death

Posted: June 28th, 2010, 10:24 am
by arcones
Trigger name? No such thing. There are trigger types and level triggers that will be needed. Requirements would be some sort of trigger for the area of the death, (if that's possible with your map as I haven't played it ;)) so that it'll change maps. However, a fade to black animation would be interesting. I suppose it's possible, but I've never done it.

But creating text would be easy. Along with the teleporting, you can have a text box appear before you teleport. Take a look at some of the coding tutorials in the Tutorials and Resources section ;)

Arcones :geek:

Re: Death

Posted: June 29th, 2010, 2:48 pm
by Leo_V117
Uh... add this to the RPG_game.cfg: death = [nap]

so you need the "when health reaches 0" [death]