I am making a wand that is normal, but I have made a right click code, but the problem is, I will not work, there is no console error either.
Here is the code
package FireRad
{
function Armor::onTrigger(%this, %player, %slot, %val, %obj, %but)
{
if(%player.getMountedImage(0) == FireRadImage.getID() && %but == 4)
{
if((getSimTime() - %obj.lastFireRad) < 5000)
{
if(isObject(%player.client))
{
%transform = %obj.getTransform();
%obj.client.camera.setOrbitMode(%obj, %transform, 0.5, 8, 8, 1);
%obj.client.camera.mode = "Orbit";
%obj.client.setControlObject(%obj.client.camera);
%obj.schedule(100,startFireRad);
}
}
else
{
messageClient(%client, '', 'You must wait before using the radius again.');
}
}
Parent::onTrigger(%this, %player, %slot, %val);
}
};
ActivatePackage(FireRad);