Author Topic: Modifying a recoil script to allow the players view tilt upwards  (Read 821 times)

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.
Code: [Select]
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;
}

you can't move the cursor up/down using setTransform

you would need a client sided add-on for this

I think you could take away control of the player put a bot in control and make the bot aim upwards
haha but thats pretty hacky