Home   Help Search Login Register  

Author Topic: Tutorial: (Local/Global/Player/server) MP scripting  (Read 8956 times)

0 Members and 3 Guests are viewing this topic.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Tutorial: (Local/Global/Player/server) MP scripting
« Reply #15 on: 06 Apr 2007, 20:17:27 »
i was referring to a unit/object that was local on a specific players machine, eg an ai unit in the players group, is local on that players machine and is therefore a useful object for certain tests
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline WhisperOFP

  • Members
  • *
  • I'm a llama!
Re: Tutorial: (Local/Global/Player/server) MP scripting
« Reply #16 on: 12 Apr 2007, 16:33:25 »
It may also be good to have informations on trigger's locality, and how they behave depending on local and global conditions.
As far as I've seen, it looks like triggers put on the editor do exist on every PC connected to the game (which is quite normal as all PC have the mission.sqm describing these triggers), and each PC check the conditions independantly. Can anyone confirm? It's a wild guess I did, but I'm not too sure.

As for triggers created with createTriggers, it looks like they only exist on the PC where they were created, and the condition is only checked there.

Btw, Terox your information about setVelocity is quite worrying to me, for another reason, which is about locality transfer.
I tried to use selectPlayer on a MP map, making the player switch to a former AI unit, and it worked. But, once I moved my new character, it was quickly put back in place. Your synchro explanation could very be the cause, which means that there is no locality transfert in this case. Sad, as it is definitely possible, as group respawn does exactly that. It's unfortunately not accessible through scripting :(
Sill now way you can fully take control of a AI unit in ArmA :(

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Tutorial: (Local/Global/Player/server) MP scripting
« Reply #17 on: 12 Apr 2007, 17:59:16 »
I get to teach a couple of friends about this topic.
The unfortunate part is I do not have a complete understanding of it all. LOL

I am getting a better understanding now about local and global commands.
Now a question about scripts, loops, conditions, etc.

In terms of keeping the impact and stress on the server FPS and performance, how do you determine which kinds of scripts should be run on the client and NOT the server; or which scripts should run only on the server; or which scripts should be allowed to remove the check at all and be ran on any machine?

It might help if we use a concrete example here.
An example for each situation would be best.


EXAMPLE:

Let's take Chaff/Flare Defense system script.

  • In this implementation we had a ExecVM an .SQF file for each Helicopter.
  • The .SQF file has a While Loop that runs until there is critical damage then stops
  • The While Do Loop checks for a missile by contantly checking for a Vehicle's variable (e.g. _helo getVariable "missileincomming";
  • This "missileincomming" variable is set through the EventHandler "IncomingMissile"

So as you can see, this While Do Loop continues to run basically until the Helo is destroyed.
Right now there is no Server or Client check at all.

My questions are this?
Does this mean the While Do loop is being run on the server CPU only by default thus causing server strain if there 60+ Helos flying around?
If it runs on the Server CPU only, can I reduce the server strain and force it to run on the Client Only without breaking functionality?
Is it possible that if one player jumps in the helo and then lands; gets out; and another player Jumps in, does the While Do loop and script switch from being run on that client to the new client?

As you can see I need some guidance here from the GURU of wisdom.

Thanks for your help in advance!


ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)