Need Help with Trigger Box Script

Post » Sat Mar 30, 2013 4:49 pm

Basically what I'm trying to do is set up a trigger box , that when an actor (not the player) passes through it, it activates a couple of bandits ( that are set to "initially disabled").

Basically setting up a little ambush and need help with scripting the Trigger box. I looked through the defaults and didn't really find anything that would work for this application.
User avatar
Alyesha Neufeld
 
Posts: 3421
Joined: Fri Jan 19, 2007 10:45 am

Post » Sat Mar 30, 2013 10:56 am

scriptname TriggerBoxAmbush extends ObjectReferenceActor property BanditA autoActor property BanditB autoActor property BanditC autoEvent OnTriggerEnter(ObjectReference akActionRef)    if akActionRef as Actor && (akActionRef as Actor) != Game.GetPlayer()	    if BanditA.IsDisabled()		    BanditA.Enable()	    endif	    if BanditB.IsDisabled()		    BanditB.Enable()	    endif	    if BanditC.IsDisabled()		    BanditC.Enable()	    endif    endifendEvent

You will, of course, have to tailor a few things to your purpose, but this should hopefully get you going on the right foot.
User avatar
Anna Kyselova
 
Posts: 3431
Joined: Sun Apr 01, 2007 9:42 am


Return to V - Skyrim