OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 27 Feb 2005, 17:47:36
-
Hi all,
I think this is kinda advanced, so I put it here ;)
What i'm trying to do is when the player enters a trigger, an extra action comes up on the action menu. Then, when the player selects it, the vehicle he is riding in speeds up slightly, and veers sharply to the right, off the road.
Is this possible at all :P
If so, how do I do it?
Thanks
-
Dunno if I got you right, but this sounds pretty much like a turbo-/nitro-boost (http://www.ofpec.com/editors/resource_view.php?id=283) thingy? There is also something like this in the buggy addon (http://ofp.gamezone.cz/index.php?showthis=5306) by Sebastian Müller. You'd have to use some additional math to get the "drift to one side" effect though.
-
giving it the action isn't hard, its making it veer off to the side
you'll have to combined velocity and direction changed at pretty exact timing
as in:
setvelocity [whatever based on direction of car to change it]
setdir (getdir car) + 2
~.5
repeat
-
Aha, i'll try both of those ;D
At the moment I was making do with this:
car1 setvelocity [-18,22,2]
That seemed to work fine, but it looked like the car had slid on ice ;)