Forum Jump :

Author Message

Posts: 1

Level: Member

Country: de
Location: Hesse
In-game name:

#1 Posted at 2020-06-20 17:44        

this tiny piece of code within the missions initplayerlocal.sqf has the capability to prevent players from speeding too fast across offroad surfaces etc.

It adds an unbearable amount of camshake to do so.
So if someone considers it as useful feel free to use it, modify it and repost it.

_surfacearray = ["SurfRoadDirt","SurfRoadConcrete","SurfRoadTarmac","concrete","dirtrunway","road","road_exp","concrete_exp"];
while {true} do
sleep 1;
waitUntil {!(isOnRoad (vehicle player)) && !((surfaceType getpos player) in _surfacearray) && (vehicle player != player) && (speed (vehicle player) >= abs 7) && (vehicle player) isKindOf "car" };
enableCamShake true;
_camshakepower = 0.35 * speed (vehicle player);
_camshakefreq = speed (vehicle player) / 4.5;
addCamShake [_camshakepower, 5, _camshakefreq];


Proof of concept:
Youtube footage.

Idea by Ir0nsight and me.

This post was edited by Schlaak (2020-06-20 17:55, 164 days ago)