Scriptname PCKP_OnHitRedirectApple extends ObjectReference ObjectReference Property XMarker autoSpell Property AppleSpell autoProjectile Property AppleProj autoint castwait = 0Event OnTriggerEnter(ObjectReference akActionRef)Projectile Apples = akActionRef.GetBaseObject() as Projectileif Apples==AppleProj && castwait==0 castwait=1 AppleSpell.Cast(self, XMarker) Utility.Wait(0.50) castwait=0endIfendEvent
The goal is, when a particular spell (the projectile looks like an apple) hits the archery target (around which is the activator in question) it bounces the projectile at a ninety degree angle. Now, obviously I can't very well just change the vector of the projectile (at least, I don't think I can) so what I've come up with is that it just recasts the spell at an XMarker placed at a ninety degree angle from the original vector.
Trouble is, there need to be two direction changes, and only one is working. The activators are both projectilezone, and both have the same script. Why would one work and not the other?