Home   Help Search Login Register  

Author Topic: Script command locality and server updates  (Read 1271 times)

0 Members and 1 Guest are viewing this topic.

Offline ceeeb

  • Members
  • *
Script command locality and server updates
« on: 26 Nov 2008, 12:48:04 »
G'day all,
  I've got a bit of time to throw at ArmA. I've decided to do some command locality testing to fill in the blanks in the BI wiki, and some large blanks in my knowledge (I must admit I am pretty much a newbie when it comes to MP scripting, but quite familiar with SP editing).  I have made a testing mission in which I can execute arbitrary code on any client, or remotely on the dedicated server.

  For those who are not familiar with the wiki's format, each script command can have either local or global (remote) arguments, and either local or global effect. I have found that some commands do not fit as neatly into this format as I had expected. For example, selectLeader will set the leader of a remote group locally, but this is then changed to the correct value is automatically (presumably by server synchronises/updates) around a second or so later. In this sense the command can be used on global arguments, with local result only (when used locally to the group, the result is then syncronised among the clients). This behaviour may allow some interesting twists if correctly (ab)used (maybe selectLeader is not the best example for this). However, in a practical sense, selectLeader can only be used on local arguments, with global effect (which seems to be broadcast instantly). These two possible ways of describing the command's locality have the opposite values, yet both are correct.

So, can any MP gurus confirm that local argument/global effect is the correct method of documenting the behaviour of such commands? Anything else I should know before I change much in the wiki? Cheers!  :scratch: ???
« Last Edit: 26 Nov 2008, 12:55:35 by ceeeb »