I'm using a recoil script for my weapon pack and I need help trying to get it to move the players view upwards. Right now the code only moves the players view to the left and right, I'd like it to move up and to the side aswell.
Here's the code. I'm not entirely familiar with how this works. All I know is that it teleports you to your current position but makes you look to either the left and right randomly.
if(isObject(%obj.getObjectMount()))
{
return %p;
}
%a = %obj.getTransform();
%rnd = getRandom(1);if(%rnd==1)
{
if($FPFeatures::DynamicRecoil)
{
%recoil = %recoil*-1;
}
}
%obj.setTransform(getWord(%a,0)@" "@getWord(%a,1)@" "@getWord(%a,2)@" "@getWord(%a,3)@" "@getWord(%a,4)@" "@getWord(%a,5)@" "@getWord(%a,6)+%recoil);
return %p;
}