Death

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the when posting support requests.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
carter472
Member
Member
Posts: 14
Joined: June 18th, 2009, 1:34 am
Name: Adam
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Death

Postby carter472 » 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.

AName
Member
Member
Posts: 14
Joined: June 23rd, 2010, 9:03 am
Name: Andrew
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Death

Postby AName » June 27th, 2010, 6:09 pm


arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Death

Postby arcones » June 28th, 2010, 10:24 am

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:
Image
Want a user bar like this one? PM Leo!

User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Death

Postby Leo_V117 » June 29th, 2010, 2:48 pm

Uh... add this to the RPG_game.cfg: death = [nap]

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





[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Sandbox General Support”

Who is online

Users browsing this forum: No registered users and 6 guests