Jump to content
Sign in to follow this  
The Hebrew Hammer

Unitplay w/land vehicles: forcing truck to spin wheels.

Recommended Posts

Hey, all I'm building a mission, and since AI cannot do high speed car chases I'm scripting it myself. I have unitplay working with an offroad truck that I want to be in the back of shooting. That all works just fine.

My question is: is there a way I can force the AI driver to accelerate generally speaking so that the wheels are spinning and it sounds like he is actually driving? I've tried engineOn and it's a start, but still no turning wheels. It isn't a huge deal because I'll be in the back in first person mode, but it would be nice if any other person were to play the mission.

Share this post


Link to post
Share on other sites

you could hack it with setvelocity probably. the movement vector for forwards in theory would increase the engine's RPM so the wheels will spin at that speed.

while{myVar} do
{
    mycar setVelocity [50,0,0];
    sleep 1;
};

Share this post


Link to post
Share on other sites

Couldn't get it working, tried a couple options for "myVar" but nothing worked. Did the path, the script call for the path, etc. didn't work.

Share this post


Link to post
Share on other sites
Couldn't get it working, tried a couple options for "myVar" but nothing worked. Did the path, the script call for the path, etc. didn't work.

myVar is the condition the loop will look for to see if its supposed to run or not, just use true if you want it to run forever, or use a variable if you want it to stop at some point.

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  

×