OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pazuzu on 31 Aug 2005, 21:10:30

Title: Check speed
Post by: pazuzu on 31 Aug 2005, 21:10:30
How do I check the speed of a vehicle?

I want to use it as a condition for a trigger. Like setting a speed limit on a truck so if it goes too fast the enemy will start firing on it.

Thanks.
Title: Re:Check speed
Post by: bored_onion on 31 Aug 2005, 21:13:45
try the coref in the ed depot. there is a command called "speed", i think.  
Title: Re:Check speed
Post by: 456820 on 31 Aug 2005, 21:25:48
i thought it was getspeed ? eg
_speed = getspeed vechile_name

but i havent used it in ages but i remember seeing it like that somethwere
Title: Re:Check speed
Post by: bedges on 31 Aug 2005, 21:38:40
the command is  speed  (http://www.ofpec.com/editors/comref.php?letter=S#speed).
Title: Re:Check speed
Post by: pazuzu on 01 Sep 2005, 07:34:03
I did check the comref and saw the command but I don't know what to do with it.

I want a truck in my mission to have a speed limit of 10 or 15 kmph and if it goes faster a trigger is fired.

What would I use for condition?

Thanks again.
Title: Re:Check speed
Post by: bedges on 01 Sep 2005, 08:09:32
condition field:

Code: [Select]
speed truck_name >=15