Welcome to the Iron Front Fan Forums!
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Santa Six

Avatar / Picture

Colonel
Registered:
Posts: 360
Reply with quote  #1 
So when a MP missions is created with scripts. Then a scripts involving spawning a single item or action must contain isServer to prevent spamming of the script amongst the clients? This has always confused me. Then don't add it if you, say, want to spawn enemy units for each client for difficulty balance?

In script form
if (isServer) then {
                          "scripthere"
};


In trigger condition form
(this) and (isServer)


If it's a addAction script. Does this make it active only for the unit that triggered the action? Leaving no use for isServer?
_unit = _this select 1;
0
[EVO] Dan

Sergeant
Registered:
Posts: 85
Reply with quote  #2 
You should use isServer for:

-Spawning objects as objects are automatically sync'd otherwise you end up with number of clients+1 objects spawned in the exact same place.
-Syncing dynamically generated missions so that the people who need it, can see it, make sure you use the set vehicle init and process init commands to do this, ideally via the use of a server logic as that is always sync'd.

Don't use isServer for:

-Any addAction commands as they will never fulfill as addAction is triggered only on the client that activates it.

If you need more info on them, feel free to post back here and I will get back to you.
0
Santa Six

Avatar / Picture

Colonel
Registered:
Posts: 360
Reply with quote  #3 

A GameLogic item spawn only happens once? Don't where to place isS... 
0
[EVO] Dan

Sergeant
Registered:
Posts: 85
Reply with quote  #4 
No, you place a game logic down in the editor, name it server logic and then pass all your setVehicleInit commands through that so you can sync dynamic breifings and whatnot from the server to the client.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.