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've been using the default script to cast spells onto the player and it works good. What I'd like, possibly amending the above script, is that a spell casts from an object to another object with a repeat time delay property. Imagine a lightning bolt shooting across the ceiling of a cave from one side to the other then repeating using the time delay property. Help with this appreciated, thanks.