ShootOnClick uses slot 0 (Activate/Use/Fire) as it's firing trigger.
Well, what if I wanted to use the jump button instead? I know it's Slot 2.
So you'd think to change this:
package shootonClick_Pack
{
function armor::onTrigger(%db,%obj,%slot,%val)
{
if(%obj.getClassName()$="Player")
{
if(%slot==0)
{
if(%val)
{
if($Sim::Time<%obj.client.SOC_LastFireTime)
{
return;
}
}
%obj.SOC_Shoot(%slot,%val);
}
}
return Parent::onTrigger(%db,%obj,%slot,%val);
}
};
ActivatePackage(shootonClick_Pack);
To this:
package shootonClick_Pack
{
function armor::onTrigger(%db,%obj,%slot,%val)
{
if(%obj.getClassName()$="Player")
{
if(%slot==2)
{
if(%val)
{
if($Sim::Time<%obj.client.SOC_LastFireTime)
{
return;
}
}
%obj.SOC_Shoot(%slot,%val);
}
}
return Parent::onTrigger(%db,%obj,%slot,%val);
}
};
ActivatePackage(shootonClick_Pack);
Right?
Well I did exactly that, and it doesn't work.
If I change it back, it works fine, but with the old trigger.
Am I missing another variable or something?