K120 1 Posted September 2, 2013 Hey,i couldn't find anything helpful about this. I need to set some vehicles to go full speed instantly as they spawn,is there something i could put in vehicles init field? Share this post Link to post Share on other sites
bangabob 45 Posted September 2, 2013 _veh setVelocity [20, 0, 0] Share this post Link to post Share on other sites
magicpanda 19 Posted September 2, 2013 (edited) I was playing around with this yesterday. setVelocity is the starting point but I think that will just fling the vehicle west or east I cant remember. [20=east/west?, 0=North, 0=vertical] You will need to get it's heading first. I think found the solution this morning but have not been able to try it yet as I'm at work. Give either of these a try. Change 100 to slow it down. _v setpos [(getpos _v) select 0, (getpos _v) select 1, 100] _v setvelocity [100 * (sin (getdir _v)), 100 * (cos (getdir _v)), 0] This one is direct from the wiki. http://community.bistudio.com/wiki/setVelocity _vel = velocity _vehicle; _dir = direction _vehicle; _speed = 10; comment "Added speed"; _vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2)]; Edited September 2, 2013 by Magicpanda Share this post Link to post Share on other sites
magicpanda 19 Posted September 2, 2013 (edited) Ok so I worked this out. This will fire truckname 100 meters per second in the direction it is facing which is obviously fucking madness. :D truckname setvelocity [100 * (sin (getdir truckname )), 100 * (cos (getdir truckname )), 0] Mission Example Edited September 2, 2013 by Magicpanda Share this post Link to post Share on other sites
magicpanda 19 Posted September 3, 2013 Did a bit more testing and this only seems to work for Cars like the Hunter. Armoured Vehicles will just hit the brakes asap. Share this post Link to post Share on other sites