Cast on Trigger script not doing anything

Post » Wed Apr 22, 2015 6:32 am

scriptName DefaultCastOnTriggerSCRIPT extends objectReference{Configurable Script.  By default: when triggered, it will cast the spell from a linked ref at the triggering actor}bool property playerOnly auto{if true, only works on the player}bool property doOnce auto{fire multiple times?}float property delayBetween auto{seconds to wait between shots.  Only relevant if doOnce == false}spell property mySpell auto{spell to cast onTriggerEnter}auto STATE active	EVENT onTriggerEnter(ObjectReference actronaut)		if playerOnly == true && actronaut == game.getPlayer() || playerOnly == false			mySpell.Cast(getLinkedRef(), actronaut)			gotoState ("inactive")  ; don't cast subsequent spells until told to do so			if doOnce == true				; and don't come back!			else				utility.wait(delayBetween)				gotoState("active")			endif		endif	endEVENTendSTATESTATE inactive	; nothing happens here.endSTATE

I'm using the defaultcastontriggerscript on a triggerbox, but it isn't doing anything. I have filled all the properties. In the scripts description it says "{Configurable Script. By default: when triggered, it will cast the spell from a linked ref at the triggering actor}". I don't see a property to add a linked ref or an object reference - in fact the script looks flawed to me.

Anybody shed some light on this please?

User avatar
Lexy Dick
 
Posts: 3459
Joined: Mon Feb 12, 2007 12:15 pm

Post » Wed Apr 22, 2015 4:51 am

The Linked Ref is set? Double click the volume in render window, find the Linked Ref tab.

User avatar
kat no x
 
Posts: 3247
Joined: Mon Apr 16, 2007 5:39 pm


Return to V - Skyrim