Script works on one activator, but not on an identical one.

Post » Sun Nov 18, 2012 10:45 pm

So I have to identical activators with the following script:

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?
User avatar
SEXY QUEEN
 
Posts: 3417
Joined: Mon Aug 13, 2007 7:54 pm

Post » Sun Nov 18, 2012 5:03 pm

This thread can get closed. The problem was that the very tip top of the activator was firing, which was embedded in some rock. Therefore there was no projectile showing up.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am


Return to V - Skyrim