Unflip/right flipped vehicle actionDescription
This is a very simple script that gives a player an action to right an empty overturned car if he walks up next to it.Acknowledgements
I must thank alef for the code to detect whether a vehicle was upright or on its side.To implement
1. Copy across the unflip folder from the test mission to your mission.
2. Copy the lines from the init.sqf in the test mission into the init.sqf in your own missionHow to use
Walk up to a flipped car and make sure no one is in it, after a second or so you'll get an action to "right vehicle", then just use it and the car will flip back onto its wheels.Background
One of my clan members has a habit of rolling any Humvee he comes in contact with and he asked me to make this.Possible changes
At the moment this script will only work with the car class but this could be easily changed. The condition that the vehicle is empty can also be easily changed.EDIT
: OK, I've removed the debug hint from the code that I accidentally left in and the dependence on QG for the test mission. I've also changed the code using a modification of a suggestion by rommel (thanks mate) so that the vehicle upright code (setPos) runs locally to where the vehicle exists - in this case as its empty, local to the server.
see version 2 belowOFPEC DOWNLOAD