Home   Help Search Login Register  

Author Topic: Seting a vehicles speed  (Read 2637 times)

0 Members and 1 Guest are viewing this topic.

Offline punisher

  • Members
  • *
Seting a vehicles speed
« on: 06 Sep 2011, 22:30:04 »
hi
How do you limit a vehicles speed to a set value? I have a chopper flying low and with the speed to limitied to allow the men to jump out into the water. However sometimes it goes to fast resulting in death, thats why a number value would be better.
The Gimp clan- pushing the limits of OFP
http://www.youtube.com/user/Pigdogmeat

Offline F2kSel

  • Members
  • *
Re: Seting a vehicles speed
« Reply #1 on: 07 Sep 2011, 00:08:33 »
try placing this in the waypoint where you want the heli to slow, name the chopper heli. You can set the speed by changing the value currently 10.

Code: [Select]
null  = [heli,10] spawn {_air = _this select 0;_speed = _this select 1;airslow = true;while {alive _air and airslow} do {_air limitSpeed _speed;sleep 0.1;};};

when you want it to resume normal speed just place this in the next waypoint or trigger  
Code: [Select]
airslow = false
« Last Edit: 07 Sep 2011, 00:14:07 by F2kSel »