Jump to content

Easiest way for instant respawn?


saintgrimm92

Recommended Posts

I'm trying to think of ways to instantly respawn an NPC as soon as it dies. Not resurrect the same NPC, create a duplicate.

 

The only thing I can think of would be creating a unique cell just for the NPC, call the NPC out of the cell with a quest, "NPC.MoveTo(SpawnLoc)".


And on the NPC, add a script with something like:

Event OnDeath(Blah Blah)
If GetStage < (stage)
UniqueCell.Reset()
NPC.MoveTo(SpawnLoc)
EndIf
EndEvent

Or is there a better way to do this? I couldn't find a "respawn" Function and came across reset while searching for one. If this won't work, is there any way to do it?

Link to comment
Share on other sites

Instead you can use PlaceActorAtMe:

 

Scriptname TM_ActorScript extends Actor

Int Property Stage Auto
Quest Property MyQuest Auto 
ObjectReference Property SpawnLoc Auto

Event OnDeath(Actor akKiller) 
    If MyQuest.GetStage() < Stage
        SpawnLoc.PlaceActorAtMe(Self.GetActorBase())
    Endif
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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