User Tools

Site Tools


arma2:scripting:dedicated_server_broadcasting

ArmA 2 Dedicated Server Broadcasting

ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools

Multiplayer dedicated server broadcasting to all clients.

Triggers are local to each machine. All text display commands are local as well.

The secret to MP editing is command called publicVariable. It's used to sync stuff between server and clients.

Here is a generic example of a double trigger approach to make sure something gets triggered/ran on everyone:

Trigger 1
Condition: !alive dude
onAct: obj1 = true; publicvariable "obj1"

Trigger 2
Condition: obj1
onAct: task1 settaskstate "succeeded"

The basic idea is to have a trigger with the condition to suit whatever you are trying to wait for. Once that trigger is fired on any machines, it will set a variable as true and tell everyone else.

Trigger 2 is used to catch the true variable sent from someone. In it's onAct you run the code that should be ran for everyone. It can be anything, set taskstate, display text, end mission.

Another example, for the intel search. This covers only case where you put an area trigger over the intel and wait for a player to just come close enough.

Trigger 1
Condition: this (set trigger side/area etc normally)
onAct: intelFound = true; publicvariable "intelFound"

Trigger 2
Condition: intelFound
onAct: taskIntel settaskstate "succeeded"; hint "Intel was found, yay!";

If you have a version of the intel pickup that uses an action. You can skip the first trigger and use only the 2nd. In the script that runs from the action, you just place: intelFound = true; publicvariable “intelFound”

arma2/scripting/dedicated_server_broadcasting.txt · Last modified: 2024/08/01 22:26 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.