Jump to content

Respawning


Recommended Posts

I'd like to know a way to make NPCs respawning, immediately after their death, or with a small delay, although that can be fixed with a timer.

Right now, I've tried this:

 Scn EP1CL0LZ
ref Pirate
Begin OnDeath
Set Pirate to GetSelf
Resurrect
Pirate.MoveToMarker T7H3M4RK3R

This yields no compiler error.

The theory is: when he dies, he gets up at the respawnspot.

The practice is: when the Pirate dies, he gets up at his death spot, without moving to the marker. When I kill him a second time, he remains dead.

 

Does anyone know a way how to get my script working, or perhaps know a better one?

 

Thanks ;)

Edited by Faceshifter
Link to comment
Share on other sites

Don't name your marker 7H3M4RK3R and just name it THEMARKER.

This. You should never start a Ref ID, Editor ID or Script Name with a number. Doing so makes the game think it's supposed to refer to a Form ID, which can cause all kinds of problems.

Link to comment
Share on other sites

Scriptname FacePirateSpawn&SpoonScript

ref Pirate

Begin OnDeath

Set Pirate to GetSelf
Player.AddItem FaceToken 1
Resurrect 1
Pirate.MoveToMarker FacePirateSpawner

End

 

The Player.AddItem FaceToken 1 is a reward for killing him. This also works only once.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...