Well ok, so useractions are local no matter if installed by config.cpp or a script, but how to replicate local commands on all clients?
One idea that might help is to have a special script (I call it "replicator script") running for each useraction, which must be executed by the init.sqs so it runs on all machines. This script only waits until another script signals a useraction, and then it runs the local commands on all machines.
I thoght this through carefully and the problem is that scripting will turn into a mess this way. The replicator script would have to check on which machine it is running, and leave out the unit which called the useraction, or else the script commands will be dublicated.
I ended up thinking that the best way to take care of all this stuff is the way they did it in Quake: generic server-client buffers. That way *all* local commands will be run through a buffer that distributes the command that should be run to all clients. On each client, there is a script that waits for a new command in the buffer, and then dispatches that command. This buffer will be used even in SP to guarantee some continuity and to avoid the mess I that the "replicator" method would introduce. Running all local commands through such a buffer could actually make it possible to write scripts that work exactly the same in SP and MP, so no need for extra code anymore
What I'd like to know is if the overhead introduced by using such a buffer would be noticable. The buffer would have to be constructed with metavariables only,since arrays don't work with the "publicVariable" command.