Jump to content

Kill player entering Trigger box


Recommended Posts

Hey fellas, need help because I feel like an actual child trying to figure this out.

I want to make the player and NPCs die when they fall off a cliff into a massive pit, full of acid. Primarily you should die when you hit the acid but alas, you do not.
I can't find any correct script anywhere and no actual information on how to make this happen, so if you know, please baby-step me through this process. Thanks! :pinch:

Link to comment
Share on other sites

If found an old script I used to poison the player while being in a triggerzone

 

 

Spell Property PoisonEffect Auto
Int Property InTrigger Auto
Actor Property PlayerRef Auto

Event OnTriggerEnter(ObjectReference akTriggerRef)
if (InTrigger == 0)
if akTriggerRef == Game.GetPlayer()
InTrigger += 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;While being in the trigger;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
while (InTrigger == 1)

PoisonEffect.Cast(PlayerRef)
endwhile
Endif
Endif
EndEvent

 

You'd need to create a spell that gives 1000 damage.

Link to comment
Share on other sites

Add a trigger volume like DefaultEmptyTrigger, on the Object Reference under Primitive tab set Collisionlayer to L_ACTORZONE

 

Add a script, pick the kill method as appropriate for the user experience/conditions you wish to deliver and set the properties;

ActorValue Property pHealth Auto
Actor Property pPlayerREF Auto

Event OnTriggerEnter(ObjectReference akActivator)
If (akActivator == pPlayerREF)
   pPlayerREF.DamageValue(pHealth, pPlayerREF.GetValue(pHealth) +1) ; may put player into bleedout if using TGM/essential death mod , or
   pPlayerREF.KillSilent(akKiller = None)  ; will not kill player if using TGM/essential death mod  or 
   pPlayerREF.KillEssential(akKiller = None) ; kills a player except if TGM
EndIf
EndEvent

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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