OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: penguinman on 14 Aug 2006, 02:10:21
-
hey, Is there anyway to create a chopper rotor breakup script. Like if the helo rotors touch the ground or a building they will break up and shoot everywhere?
-
Would be a damn nice script, only the lack of getPitch and getBank commands would make it almost if not totally impossible to script. With the proper pitch and bank information you could put a gamelogic on the four apex of the rotors and use
?(objec height <1) || ?((nearestObject logic) distance logic < 1):goto"Break"
Not to sure about the nearestobj command though.
Ofcourse, you could make an addon with the first 4 cargo positions at the 4 apex of the rotor, fill em with logics and get the positions from there.
-
ok, well if not that, how would I script sombody dying from walking into and Airplane rotor. Like the cessna.
-
If it was on the ground you could get the distance from the centre of the plane (the position gained by getPos), and the direction the plane is facing, compare the two with some fancy mathmatics which I am absolutely no good at whatsoever, the compare that to the getPos of the nearest man object or defined unit, and if it's close enough run a setdammage and perhaps a little bit of setVelocity for eyecandy.
Would all be in the math.. which ofcourse I'm no good at :p
**edit**
although, again, with a small config edit of the unit you could add a cargo position on the rotor and fill it with a gamelogic (could be done inside the addon automatically so the player can't forget to add them)
I think these kind of faked cargo positions would be a very god idea for future addons, and could add quite a bit of realism to the game. A few times I've had my helo rotors go through an opponent and wished for them to be cut to shreds by them.