Jump to content
Sign in to follow this  
TAW_Yonose

Faster vehicle

Recommended Posts

Okey so i'm making a racing mission where i need to different cars/motorcycle to go up to about 100speed, BUT have the same accelration as it is in standard.

And do i have to set the script in the inti.sqf file or in the initialization?

Thank you :)

Share this post


Link to post
Share on other sites

do you know how i can disable the offroad speed, that i have the same speed at the road as offroad?

Share this post


Link to post
Share on other sites

There is no actual command in the script I point to you would probably need to adjust the values in this line.

(!isOnRoad (position player)) then {_speedX = 0.2} else {_speedX = 0.1};

Sorry I don't have time right now mess with it.

Share this post


Link to post
Share on other sites

how will this be in the inti.sqf file since it i couldnt get it working in the initialization?

mhm im not good in this

Share this post


Link to post
Share on other sites

Just making a suggestion.

Maybe you could try by altering the waypoints, if you have placed any.

You know, adjust the move waypoints to slow or fast.

This will increase or decrease acceleration in a race with AI involved, although always in the vehicles' limits.

Hope this helped.:)

Share this post


Link to post
Share on other sites

All the vehicles will be driven by players, but i dont know how to edit the script into the init.sqf file..

Share this post


Link to post
Share on other sites

use setVelocity ! it's the best way to do it in my opinion !

the core of the script should look like this :

_speed_increase = 1.1;
_vehicle_velocity = velocity _vehicle;
_vehicle setVelocity [(_vehicle_velocity select 0)*_speed_increase,(_vehicle_velocity select 1)*_speed_increase,(_vehicle_velocity select 2)*_speed_increase];

It's really a rough idea ... you should add many conditions before ! depending on how you want to use it ! through an eventhandler (getin) or just some line in init.sqf

Maybe this will work !

create a sqf file and put this inside :

speedincrease = 1.1;
while (true) do {
if (vehicle player isKindOf "LandVehicle") then {
(vehicle player) setVelocity [((velocity (vehicle player)) select 0)*speedincrease,((velocity (vehicle player)) select 1)*speedincrease,((velocity (vehicle player)) select 2)*speedincrease];
};
};

and in your init.sqf put this !

[] execVM yourfile.sqf;

Edited by Xalteva

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×