Jump to content
Sign in to follow this  
SirMrE

Revive & Respawn

Recommended Posts

Hi everyone,

 

I searched around but I didn't manage to find anything which answered my question.

I am trying to make a revival script, so when a player dies, another can revive or hit a button to respawn after x secnods.
My inspiration is Sa-matra's wasteland, in the sense of when you die, you can wait until you get revived, or you can click respawn and you can no longer get revived and will respawn within n seconds.

 

I can make the dialog show up when the player dies and coding the actual revival script is not the problem. My problem is when the player dies, they immediately respawn or respawn after the n seconds defined in the description.ext. How can I make it so when they die, you just lie there until they click a button, which will then respawn them.

 

I hope I made sense, else let me know and I'll elaborate.

 

Thank you everyone!

Share this post


Link to post
Share on other sites

I guess you could add a HandleDamage event handler to them, and detect when they "die". But instead of killing them, force a suitable animation on them until they're revived.

Share this post


Link to post
Share on other sites

I guess you could add a HandleDamage event handler to them, and detect when they "die". But instead of killing them, force a suitable animation on them until they're revived.

I tried setting their damage to 0.99 and put then unconscious, but it didn't see to work. They would still respawn after n seconds.

I could easily have coded it wrong of cause.

The source code is available here: https://github.com/MrEliasen/Supremacy-Framework/tree/dev-unstable if this helps. It's not done at all, but the core logic for the "death screen" should be in place.

Share this post


Link to post
Share on other sites

BIS have created a simple revive template, just put this in your description.ext file

respawnTemplates[] = {"Revive", "MenuPosition"};

or 

respawnTemplates[] = {"Revive"};
  • Like 1

Share this post


Link to post
Share on other sites

 

BIS have created a simple revive template, just put this in your description.ext file

respawnTemplates[] = {"Revive", "MenuPosition"};

or 

respawnTemplates[] = {"Revive"};

 

Ohh, thanks you for the tip. I'll give those a look.

 

Appreciate the help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×