Jump to content

[color="#4169E1"]Script Fonction Question[/color]


reaper9111

Recommended Posts

Hello guy's, i'm having a lil problem...

When the player kill that XActor, he then teleport somewhere... When this teleportation is done, i want this same XActor to be alive again...

So my question is does the "ResetHealth" fonction would work in such situation ? The CS wiki is not mentionning anything about this !!!

Would it be better to use the "Resurrect" fonction on that XActor insted ?

 

Many thanks

Reaper

Link to comment
Share on other sites


Ref DeadGuy
Ref MoveMarker

Begin OnLoad
   Set DeadGuy to [The NPC]
   Set MoveMarker to [Marker reference for MoveTo]
end

Begin OnDeath
    If DeadGuy.GetDistance Player >= 5000
         DeadGuy.Resurrect
         DeadGuy.MoveTo MoveMarker
    Endif
          Return
End

 

Should wait for the player to get an okay distance away before resurrecting and moving to the place you want him to.

You need to test this out and change the distance to fit your particular circumstance. I'ma bit coffee-lacked and tired as heck, so it might not be exactly what you wanted. Hope it helps though. Attach this to the NPC in question.

 

Be well, sleep well, fight well, live long.

~Ranokoa

Link to comment
Share on other sites

I don't think that's going to do the trick.

 

The criteria "If DeadGuy.GetDistance Player >= 5000" is only going to execute onece in an OnDeath Block. It isn't going to keep checking until the player is far enough away.

Link to comment
Share on other sites

Ya I just realized that when my brain woke up with coffee.

Ref DeadGuy
Ref MoveMarker
Short DistanceCheck

Begin OnLoad
   Set DeadGuy to [The NPC]
   Set MoveMarker to [Marker reference for MoveTo]
end

Begin GameMode 
    If (DeadGuy.GetDead == 1) && DeadGuy.GetDistance Player >= 5000
         Set DistanceCheck to 1
    ElseIf DistanceCheck == 1
          DeadGuy.Resurrect
          DeadGuy.Moveto MoveMarker
          Set DistanceCheck to 0
     EndIf
           Return
end     

 

That might help a bit. It'll wait for the guy to die, and after it does that wait for the distance to be correct, then proceed.

Still waking up, so if it's not ganna work still don't blame me, blame my brain. :D

 

Be well, sleep well, fight well, live long.

~Ranokoa

Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

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