Hello all.
I have a script called from an addaction command that needs to affect global objects. The addaction starts on an object added by the editor, which all players can see. Once an individual selects the action, the script only runs on their computer.
Other players can see the effects of this script, which is fine, however the script adds actions to new objects in the script, which only that player can select in the menu. I understand that's probably because only that player called the script, but even using global variables (i.e without an underscore prefix) for objects and adding actions, it still remains only on the original caller's system.
I used a hint format for X/Y of the object. On their screen it gives the co-ordinates whereas on my screen it errors due to the object claiming not to exist, even though I can see it.
If there's some way of adding actions and so on globally rather than just that player, I'd be grateful for some help.
Here's some snippets to give a rough idea of what I'm trying to do, though obviously I've made it a bland example (sqs format)
object1 = nearestobject [(_this select 1),"objectstring"]
object2 = "objectstring" createVehicle [(getpos object1 select 0), (getpos object1 select 1), 0]
object2 addaction ["string","script.sqs",null,-1,false,true]
Thank you in advance.