OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Piraneous on 28 Jan 2004, 10:08:29
-
ok, i've just got back into scripting again and i'm a bit rusty. want to make what should be a fairly simple script that will detect the speed of a vehicle and when it slows below a given speed it sets a variable to true which i can then use to activate another trigger
any ideas?
-
speed unitname < 5
... or whatever speed you want to use.
-
well that works for setting off the trigger, but now the problem is, when the chopper spawns, its speed it already less than 5 so the trigger activates straight away.
-
@ speed heliname > 5
@ speed heliname < 5
in a script it wil wait til it passed da speed b4 startin da check ;D
as 4 trigs
2 trigs
1
condition filed : speed heliname > 5
activision : abovespeed = true
2
condition field : speed heliname > 5 and abovespeed
activision : wateva
LCD OUT
-
Johan Gustafsson's Scripting Tutorial v2.0 (http://www.ofpec.com/editors/resource_view.php?id=54). There should be a script in there that does exactly what u want :cheers:
-
ok cool, i used 2 triggers, one that sets above speed when the heli's speed is above 5 and one that sets my variable to true when it slows below 5.
now for the next trick, when the heli goes below 5, its height is set to 4, i want the squad in the back to jump out of the helicopter without it landing fully. at the moment, as soon as my bailout variable is set, the choper tries to land to let the guys out.
i'm sure this is a somewhat harder script to write. i'm hoping to avoid having to do somethign like an old rapeling script i downloaded a few years ago.
-
wait out, i can just get them to eject, that works.
thanks for you help guys