stateName[4] = "Reload";
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready"; //This is what determins firemode, "TriggerUp" = SemiAuto, "Timeout" = Auto
stateSequence[4] = "Ready"; //so "stateTransitionOnTimeout[4], used to be "stateTransitionOnTriggerUp".
function #T#ommyGunImage::onMount(%data, %obj, %slot)
{
%obj.hideNode(RHand);
%obj.hideNode(LHand);
%obj.hideNode(RHook);
%obj.hideNode(LHook);
}
function TommyGunImage::onUnMount(%data, %obj, %slot)
{
if(isObject(%client = %obj.client))
{
%client.applyBodyParts();
}
else
{
%obj.unHideNode(RHand);
%obj.unHideNode(LHand);
}
}
package TommyGun
{
function serverCmdUpdateBodyParts(%client, %a, %b, %c, %d, %e, %f, %g, %h, %i, %j, %k, %l)
{
parent::serverCmdUpdateBodyParts(%client, %a, %b, %c, %d, %e, %f, %g, %h, %i, %j, %k, %l);
if(isObject(%player = %client.player) && isObject(%player.getMountedImage(0)) && %player.getMountedImage(0).getName() $= "TommyGunImage")
{
%obj.hideNode(RHand);
%obj.hideNode(LHand);
%obj.hideNode(RHook);
%obj.hideNode(LHook);
}
}
};
activatePackage(TommyGun);
};
function TommyGunImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway); //The default animation played when you fire the weapon. Change this if you know another default animation
Parent::onFire(%this,%obj,%slot);
}
Here's my code I have for my weapon, and there seems to be an error here. The "#" is on the line of code that has the error, and I outlined it in bold exactly how it looks in my error message. What am I doing wrong? I tweaked it a little and nothing changes. My "onFire" function works fine with the "TommyGunImage" I have set for it. Any ideas?