KaRRiLLioN 0 Posted January 24, 2007 I have a capture and hold script that checks for specific vehicles in order for the sector to be capped. Â The script is Server-side only. Here's the code sample: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ammoTruckWest = "Truck5tReammo" repairTruckWest = "Truck5tRepair" fuelTruckWest = "Truck5tRefuel" ammoTruckEast = "UralReammo" repairTruckEast = "UralRepair" fuelTruckEast = "UralRefuel" _w = nearestObjects [_spot,[ammoTruckWest,repairTruckWest,fuelTruckWest],10]; _vehW = _w select 0 _e = nearestObjects [_spot,[ammoTruckEast,repairTruckEast,fuelTruckEast],10]; _vehE = _e select 0 In single player, it detects the objects just fine. Â In multiplayer, I had three trucks which respawned server-side, and the player could createVehicle the trucks (rts-style) local to the client. The trucks which respawned server-side were detected by the script. Â The vehicles created by the player were not. Â In other words, it appears that if a vehicle is created client-side, the server does not detect them using nearestObjects. Would this be a bug, or intentional? Â I tested this several times by running a dedicated server and using vehicles spawned server side and vehicles created local to me. Â I wouldn't think this behavior is desireable. I worked around it by using triggers, but since nearestObjects offers so much nice flexibility in unit classes and distance, I'd prefer to use it. Anyone else suffer this phenomonon? Share this post Link to post Share on other sites
SenseleSS Violence 0 Posted January 24, 2007 sounds like a publicVariable problem Share this post Link to post Share on other sites
UNN 0 Posted January 24, 2007 Quote[/b] ]sounds like a publicVariable problem Nah, it's working on a different level. This is a internal problem within Arma's MP engine. Quote[/b] ]The trucks which respawned server-side were detected by the script. The vehicles created by the player were not. In other words, it appears that if a vehicle is created client-side, the server does not detect them using nearestObjects. Out of curiosity does it add the client side created vehicles to the array accesed using vehicles. Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted January 25, 2007 I haven't checked that, but I will. I ran more extensive tests with the dedicated server sending out a public msg string so I could see what it sees. Interestingly enough, when I created a vehicle locally, the server did detect it briefly, then it abruptly vanished from its radar. Odd. I whipped up a sample mission and sent it to Suma to see if perhaps I'm making a mistake, or this is something that needs repair. I can get around using nearestObjects, but it's such a dandy command, that I'd rather not. Here's the sample mission if anyone wants to futz with it. ftp://addons:corn@208.63.124.254/nearestObjectsTest.zip To test on a dedicated server, all you need to do is run ArmA with the -server parameter and then run the client as you normally do. Click on address: Internet and it'll change to LAN and you'll see your dedicated server. Share this post Link to post Share on other sites
whisper 0 Posted January 25, 2007 Perhaps fiddling with "createTrigger" and associated commands could permit you to get the same flexibility nearestObject has, if that can help Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted January 25, 2007 I already worked around it with triggers. I just prefer not to use them. But oh well--for now at least. Share this post Link to post Share on other sites