I have edited the gun and player script to aim down sight and have gotten it to work.
Now the next thing to do is to make the scatter decrease. i have created a partial code which i want to set the scatter to what i set it to be.
Here is the Code
function Script:UpdateWorld()
if self.ADSmode == false then
self.camera:SetFOV(70)
self.weapons[self.currentweaponindex].offset = self.weapons[self.currentweaponindex].offsetNor
end
if self.ADSmode == true then
[u]self.scatter = self.scatterADS[/u]
self.weapons[self.currentweaponindex].offset = self.weapons[self.currentweaponindex].offsetADS
self.camera:SetFOV(30)
end
ScatterADS is a copy of Scatter that is setable(to change the scatter when aim down sights)
this code is not working. I just uploaded a version of the code without the scatterADS. Link-http://www.leadwerks.com/werkspace/files/file/576-aim-down-sights/
Why does this not work