Try plane setvelocity [0,0,0]
Actually, I think setvelcocity [0,0,0] would work. Let us know if it does or doesn't.
_vel = velocity plane
_velx = _vel select 0
_vely = _vel select 1
_velz = _vel select 2
plane setvelocity [(_velx / 2),(_vely / 2),(_velz / 2)]
_vel = velocity plane
_velx = _vel select 0
_vely = _vel select 1
_velz = _vel select 2
plane setvelocity [(_velx * 2),(_vely * 2),(_velz * 2)]
_vehicle = vehicle (_this select 1)
#nitroboost
_vehicle setvelocity [(velocity _vehicle select 0) * 1.1,(velocity _vehicle select 1) * 1.1,(velocity _vehicle select 2) * 1.1]
?_time > 3:exit
~0.1
goto "nitroboost"
_vehicle = _this select 0
_goal = _this select 1
_rate = _this select 2
_speed = speed _vehicle
_ratio = _speed / _goal
?_speed > _goal:goto "slowdown"
goto "speedup"
#slowdown
_vehicle setvelocity [(velocity _vehicle select 0) / 1.05,(velocity _vehicle select 1) / 1.05,(velocity _vehicle select 2) / 1.05]
~rate
?speed _vehicle < _goal:exit
goto "slowdown"
#speedup
_vehicle setvelocity [(velocity _vehicle select 0) * 1.05,(velocity _vehicle select 1) * 1.05,(velocity _vehicle select 2) * 1.05]
~rate
?speed _vehicle > _goal:exit
goto "speedup"
_vehicle = _this select 0
_goal = _this select 1
_rate = _this select 2
_speed = speed _vehicle
?_speed > _goal:goto "slowdown"
goto "speedup"
#slowdown
_vehicle setvelocity [(velocity _vehicle select 0) / 1.05,(velocity _vehicle select 1) / 1.05,(velocity _vehicle select 2) / 1.05]
~_rate
?speed _vehicle <= _goal:exit
goto "slowdown"
#speedup
_vehicle setvelocity [(velocity _vehicle select 0) * 1.05,(velocity _vehicle select 1) * 1.05,(velocity _vehicle select 2) * 1.05]
~_rate
?speed _vehicle >= _goal:exit
goto "speedup"
There are several new config entries for planes in 1.90 that could help addon creators, especially for planes that are much smaller or bigger than the default OFP planes:
Code Sample
landingSpeed = 0;
flapsFrictionCoef = 0.5;
wheelSteeringSensitivity = 1.0;
landingSpeed
This entry tell AI autopilot what speed it should use when landing. It does not determine stall or landing speed, it is used to inform AI what the landing speed is. If zero (default) is given, landing speed is calculated as:
landingSpeed = max(maxSpeed/3, 120 km/h)
flapsFrictionCoef
This tells how much friction flaps cause when fully applied. Total airplane friction is modified as follows.
result_friction = air_friction * ( 1+ flap_state*flapsFrictionCoef)
wheelSteeringSensitivity
Use this to make airplane more or less steerable when taxiing. Bigger means value - smaller turn radius possible.
Using those entries will not cause any problem when addon is used with older OFP version, and it will improve addon in 1.90.
--------------
Ondrej Spanel, BIS Lead Programmer
In any event, I think you should leave out the adjustment to the z-velocity in those scripts. Afterall, the arrester hook does not make the plane stop moving vertically, eh?
Sorry, this script don`t work. There is a error. I think, my computer don`t know the word "setvelocity".
which version are you using ? I`m using v1.75 !
vehicle setVelocity [x, z, y]
Operand types:
vehicle: Object
[x, z, y]: Array
Compatibility:
Version 1.8 required.
Type of returned value:
Nothing
Description:
Set velocity (speed vector) of vehicle.
could you make a mission, please ? I`m too stupid to do that
thanks toadlife, i hope you don't mind if i use this script in a addon?