OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: ZapBrannigan on 01 Oct 2011, 17:58:35

Title: setvelocity doesnt work on certain cars
Post by: ZapBrannigan on 01 Oct 2011, 17:58:35
Has anybody else noticed this?

I cant get it to work on the hatchback, or the tractor, or humvees.  it just teleports them a little to the side or up.    But it works on motorcycles and ships and people.   I need to setvelocity a humvee... so what should i do?

thanks
Title: Re: setvelocity doesnt work on certain cars
Post by: F2kSel on 02 Oct 2011, 16:28:29
I hadn't noticed this before even though I use setvelocity quite a bit but you're right.
It does seem to work the first time the command is used but after that it just gives them a nudge.

I have created a ticket for it but a minor bug like this may not get much attention.

http://dev-heaven.net/issues/25085 (http://dev-heaven.net/issues/25085)

You may be able to work around it though but it depends on what your doing.
If it's for a static vehicle then  you could just attach the car to an invisible motorbike and then setvelocity the bike.
Title: Re: setvelocity doesnt work on certain cars
Post by: johnnyboy on 13 Oct 2011, 02:38:28
This is strange.  The following works for me on Tractors and Humvees.

I put the following line of code in a Talk trigger, followed by a cycle trigger (to make it loop).  The talk trigger has a 1 second minimum.  This is the code in the Talk trigger, where the humvee or tractor is named hum1:

hum1 setvelocity [15,15,1];

Every second, the vehicle is moved by the setvelocity command.  Works for me.
Title: Re: setvelocity doesnt work on certain cars
Post by: F2kSel on 13 Oct 2011, 14:40:24
Only the first jump works correctly for me after that the vehicle does move but only in small increments.

using hum1 setvelocity [0,0,10]; the vehicle will jump 10 meters into the air after that using it again it's just gives a 1 meter jump.  If I swap it for a tank every jump is 10 meters.