Author Topic: Prevent arm from going up  (Read 661 times)

When firing the default gun, how do I prevent the gun from flinging up?

From Weapon_Gun

Code: server.cs (6 lines)
function gunImage::onFire(%this,%obj,%slot)
{
    if(%obj.getDamagePercent() < 1.0)
        %obj.playThread(2, shiftAway);
    Parent::onFire(%this,%obj,%slot);   
}


This is your animation when it shoots (::onFire)
%obj.playThread(2, shiftAway);



Although, the launcher will overwrite your modifications so either set it to read-only or avoid the launcher and use a batch file.
« Last Edit: January 10, 2016, 10:21:30 PM by Kyuande »

Code: server.cs (6 lines)
function gunImage::onFire(%this,%obj,%slot)
{
    if(%obj.getDamagePercent() < 1.0)
        %obj.playThread(2, shiftAway);
    Parent::onFire(%this,%obj,%slot);   
}

what did you use to do this?

Although, the launcher will overwrite your modifications so either set it to read-only or avoid the launcher and use a batch file.
don't do this, just create a copy of the gun datablocks that you are going to change and apply the change and include the new functions

Additional question, how would I make the weapon have a different sound when equipped?

Code: [Select]
stateName[0] = "Activate";
stateSound[0] = whateversound;
restofthestatestuff