×
Меню
Индекс

MSFD Resurrecting a dead Actor

 
Resurrect
 
gateway_haunt->Resurrect
 
This function brings an Actor back to life. His stats and inventory will be reset, basically he "respawns". There is a bug when you use this function on the player – it will stop the PC (and all Actors) from casting magic. After saving and reloading this side effect goes away.
Note: The Puzzle Canal Script shows an alternative: it simply uses GetHealth <10 to determine when player is "nearly" dead and then "resurrects" him by giving him his health back – so the player actually never really dies.
 
Sample Script: some people are just tougher than others…
Begin dandrasScript
 
short deathbed
float dandrasHealth
 
if ( deathbed == -1 )
     return
endif
 
set dandrasHealth to GetHealth
 
if ( dandrasHealth <= 50 )
     if ( dandrasHealth < 1 )
          Resurrect
          ModHealth 100
     endif
     set deathbed to 1
endif
 
if ( deathbed == 1 )
     ForceGreeting
endif
 
 
 
End dandrasScript