BEAKSBY 11 Posted October 17, 2014 (edited) Hi All, I have freight boxes in my mission that when a player is within 10m it moves away and the player collects the money inside. waitUntil {sleep 0.1; ((player distance _box) < 10)}; _box setPosATL [0,0,100]; BUT, if the player is driving, and is going too fast he'll crash into and die. Not the desired result. How do I make the _box disableCollisionWith any unit or vehicle if the locality changes? Command has to be executed where objects are local, and as long as they don't change locality, the effect of this command will be global. If the 2 objects are not local to the same computer, then it has to be executed on both computers to achieve the desired effect. If one or both objects change locality, the command needs to be executed again on the new owner's machine(s) to maintain the effect. This is not working: [_box, vehicle player] call SVAGLOBAL; SVAGLOBAL = {if (local (_this select 0)) then {(_this select 0) disableCollisionWith (_this select 1); //REMOTE vehicles (not local to client) } else {[_this,"SVAGLOBAL",_this select 0,FALSE,TRUE] call BIS_fnc_MP;};}; Edited October 17, 2014 by BEAKSBY Share this post Link to post Share on other sites
killzone_kid 1333 Posted October 17, 2014 Try vehicle player instead of player in waitUntil. It is pretty strange, you have to be moving faster than 200 mph for the loop to not lift box in time. On the other hand if you have many many boxes all using waitUntil, then it is understandable. Share this post Link to post Share on other sites
BEAKSBY 11 Posted October 17, 2014 Try vehicle player instead of player in waitUntil. It is pretty strange, you have to be moving faster than 200 mph for the loop to not lift box in time. On the other hand if you have many many boxes all using waitUntil, then it is understandable. THanks, I do have multiple boxes, but they only spawn about once a minute. Share this post Link to post Share on other sites
dreadedentity 278 Posted October 17, 2014 If one or both objects change locality, the command needs to be executed again on the new owner's machine(s) to maintain the effect. Unless you're running this on a dedicated server, or there are other players in your game, you don't need to worry about this Share this post Link to post Share on other sites