Author Topic: Secondary Function  (Read 642 times)

I copied the secondary function from the Katana script and pasted it into my Scythe script. I'm pretty sure I renamed everything correctly but it still doesn't work.
Code: [Select]
package ScytheDash
{
   function armor::onTrigger(%this,%player,%slot,%val)
   {
      if(%player.getMountedImage(0) $= ScytheImage.getID() && %slot $= 4)
      {
         if(%val)
         {
            %curVelocity = %player.getVelocity();
            %vel1 = getWord(%curVelocity, 0);
            %vel2 = getWord(%curVelocity, 1);
            %vel3 = getWord(%curVelocity, 2);
            if(%vel1 < 8 && %vel1 > -8 && %vel2 < 8 && %vel2 > -8)
            {
               %vel1 += %vel1 * 3.2;
               %vel2 += %vel2 * 3.2;
               %player.setVelocity(%vel1 SPC %vel2 SPC %vel3);
   %player.playthread(2, Shiftdown);
            }
            else
            {
               parent::onTrigger(%this,%player,%slot,%val);
            }
         }
         else
         {
            parent::onTrigger(%this,%player,%slot,%val);
         }
      }
   }
};
activatePackage(ScytheDash);
Please post any ideas you have as to why this is happening.