Jump to content

Photo

Need assistance in creating a Script

script respawning

  • Please log in to reply
3 replies to this topic

#1
Dufftacular

Dufftacular

    Newbie

  • Members
  • Pip
  • 11 posts

Hello,

    I am needing help in having a script that I can attach to an Actor that makes them respawn after death after a certain amount of time. 

    Like, the player kills said Actor, say 10 seconds passes, and the actor respawns. Creating an infinite loop. 

    Thanks! 



#2
DieFeM

DieFeM

    Old hand

  • Members
  • PipPipPip
  • 981 posts

You can use the event OnDeath or OnDying, in it you can call a 10 seconds timer with StartTimer, and respawn it in the OnTimer Event.

 

Search for examples of those in the wiki.



#3
LarannKiar

LarannKiar

    Old hand

  • Members
  • PipPipPipPip
  • 1,266 posts

Did you mean "resurrect" instead of "respawn"?

Spoiler

 

Or did you mean to spawn a new NPC?

Spoiler

 

NPCs respawn when their Cell resets.



#4
Dufftacular

Dufftacular

    Newbie

  • Members
  • Pip
  • 11 posts

Did you mean "resurrect" instead of "respawn"?

Spoiler

 

Or did you mean to spawn a new NPC?

Spoiler

 

NPCs respawn when their Cell resets.

Thanks, but what I mean is like, for example. In the cell "DebugRange" , the T-Posing NPC's, once they die, their dead body despawns and they respawn back on their marker after like 3 seconds. Was wanting something like that and if possible a timer added onto it. And is looping so it does not have any limit to how many times it can be done. I tried messing with the script there but I am not very good at making them.







Also tagged with one or more of these keywords: script, respawning

IPB skins by Skinbox
Page loaded in: 1.023 seconds