(tractorinitpos is a gamelogic placed somewhere)
// tractor_turning.sqf
_tractor = "tractor" createVehicleLocal getPos tractorinitpos;
...
deleteVehicle _tractor;
Would it be MP safe ensuring all the clients and servers see the same?
Dunno about game logics and
createVehicleLocal, but the sleep command would cause some timings differences, as we discussed earlier in this thread. Best bet is to use
createVehicle and run this script only on the server. That is 100%.
As for mando_missile. Your effects display on all clients because ArmA uses
createVehicle for particles and not the
drop command.¦nbsp; Most everything missile related will work fine if run server side only. Your problem will be translating the missile interface control to MP, because it needs to run on all clients and communicate the information back to the server using
publicVariable. You need to write a server side monitor script, and a client side broadcast script, which is not trivial.¦nbsp; Data transmission from client to server also must include when a player activates anti-missile. For example, the player activates chaff. You publicVariable the player to ther server as a new global variable
chaffer = player. The server monitor detects that
chaffer is not null, activates the chaff script at that player's location,¦nbsp; resets
chaffer to null, and then waits for chaffer to become non null again.
The problem is when two or more players chaff at nearly the same time. Whichever player's chaff request reaches the¦nbsp; server first will be fine. The other players will be out of luck. For this reason each player needs to be assigned a different
chaffer_j variable, and there must be separate monitor scripts for each
chaffer_j. The easiest way to do this is with dynamic variables.
Now I am not up to speed on MP scripting in ArmA, so there might be a better way. Obviously ECP had an extensive server/client-monitor/broadcast system. Chain of Command's CoCNS2 for OFP was designed specifically for problems such as these.
Finally, using
createVehicle for particle effects might cause network lag if a huge number of particles are being used. What a huge number is, I don't know, but each particle source should probably be treated as a vehicle wrt to network traffic. In reality, I suspect they should¦nbsp; should only be a fraction of a vehicle's network traffic.