Jump to content
Sign in to follow this  
K.Hunter

setVelocity in MP

Recommended Posts

Hello everyone, I'm having a bit of a problem with a script I'm working on. I won't get into detail and make the thread too wordy unless someone asks for more info, because I know where the problem is. I can't say I'm new to scripting but I'm certainly not an experienced one either.

Long story short, the problem only happens in multiplayer. The script is executed on only one client and it needs to set the velocity of another guy's vehicle. Unfortunately the command "setVelocity" only takes local arguments, apparently... I've thought about different possibilities about the script and I think the safest solution is to get all clients on the server (and also the server itself) to execute a piece of code with the setvelocity command, and make sure the same thing happens on everyone's little world. The problem is I don't know how to get a script running on only one client to force everyone to do this. Do I have to use a "public variable eventhandler"? I've never used that and not sure how exactly it works.

EDIT: sorry I accidentally chose the "ADDONS" section on the forum... Should have been missions...

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  

×