I can't seem to figure out what is the command in scripts for Clicking the right mouse to Activate. I am trying to get my T811AR to hit people. If it is possible. I believe it is. I have animation for it.
Now There is a Syntax Error when I put in the Hitting Command.
This is What console says about it.
Loading Add-On: Weapon_T811AR (CRC:-1377789323)
Add-Ons/Weapon_T811AR/server.cs Line: 401 - Syntax error.
>>> Some error context, with ## on sides of error halt:
Parent::onFire(%this,%obj,%slot);
}
^function armor::onTrigger(%this, %obj, %triggerNum, %val)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftaway);
}
^function armor::onTrigger(%this, %obj, %triggerNum, %val)
{
directDamage = ##3##5;
directDamageType = $DamageType::T811AR;
radiusDamageType = $DamageType::T811AR;
explosion = T811ARExplosion;
//particleEmitter = as;
muzzleVelocity = 50;
velInheritFactor = 1;
armingDelay = 0;
>>> Error report complete.
ADD-ON "Weapon_T811AR" CONTAINS SYNTAX ERRORS
This is the script part.
function armor::onTrigger(%this, %obj, %triggerNum, %val)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftaway);
}
function armor::onTrigger(%this, %obj, %triggerNum, %val)
{
directDamage = 35;
directDamageType = $DamageType::T811AR;
radiusDamageType = $DamageType::T811AR;
explosion = T811ARExplosion;
//particleEmitter = as;
muzzleVelocity = 50;
velInheritFactor = 1;
armingDelay = 0;
lifetime = 100;
fadeDelay = 70;
bounceElasticity = 0;
bounceFriction = 0;
isBallistic = false;
gravityMod = 0.0;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
uiName = "T811AR Hit";
};