wass24 0 Posted March 16, 2007 I'm creating a multiplayer mission revolving around emergency vehicle responses controlled by 1 player (me). I want to be able to drive a car and have 1 or 2 cars driving directly behind me where ever I go. The AI drivers will not follow me the way that I want them to, so I set up 2 scripts. One script checks if a car that I will drive is moving, if it is, then the other script takes my cars position and direction and loops it to the cars following me. This actually works, but with numerous vehicle groups like this and too many scripts looping at the same time without exiting, the server lags too much. I would like to set up eventhandlers that check if I am the driver of "car1" and if so, have "car2" and "car3" follow. If I get out of "car1" then the script will end. If that can't be done, how do I get my original scripts to stop looping when I get out? Share this post Link to post Share on other sites
W0lle 1052 Posted March 16, 2007 Moving to Mission Editing & Scripting where it belongs to. Share this post Link to post Share on other sites
karantan 0 Posted March 16, 2007 I hope I do uderstand your question dude, and also it's hard to answer on such question 'on blind' ... Try this; on apropriate place (most probably on the beginning of the loop) place: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? not (unitname in car1) : out_of_car = true; exit and in the other scripts: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? out_of_car : exit I hope this is what you're looking for. Share this post Link to post Share on other sites