So I made a script that works great on the WETempActivator but when I go to World Objects > Activators > Water section and move a water to the render window and then proceed to apply the same scrip it does not work.
Here is the script I'm trying to get to work on a Water Activator.
Scriptname ZapScript extends ObjectReference
import Utility
Actor Property PlayerREF Auto
Float Property RandomRate Auto ; Add random delay to pulse rate, capped at this value
Activator Property TargetType Auto ; What type of object are we zapping if we're spawning a node?
ObjectReference Property CurrentTarget Auto ; The actual target we're shooting at
Bool Property SpawnNode Auto ; Do we spawn a target? If not, zap the nearest valid target. Initializes 'False'
Spell Property Zap Auto ; What spell shall we use for the effect?
FormList Property TargetTypeList Auto ; List of potential targets
SPELL Property Bolt Auto
Event OnHit(ObjectReference akAggressor, Form akSource,Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
bool abBashAttack, bool abHitBlocked)
if akSource == Zap
CurrentTarget = PlayerREF
if CurrentTarget ; it's possible that there is no target
Bolt.RemoteCast(self, Game.GetPlayer(), CurrentTarget )
endif
endif
EndEvent
I have made sure that I've set the properties the same as well.