Server Events: Difference between revisions
Line 16: | Line 16: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
|ACTION_MENU_SET_FUNCTION_AVAILABLE | |'''ACTION_MENU_SET_FUNCTION_AVAILABLE''' | ||
|Add or remove a function from a particular Action Menu | |''Add or remove a function from a particular Action Menu'' | ||
|- | |- | ||
|ACTION_MENU_SET_MEASURE_AVAILABLE | |'''ACTION_MENU_SET_MEASURE_AVAILABLE''' | ||
|Add or remove a measure from a particular Action Menu | |''Add or remove a measure from a particular Action Menu'' | ||
|- | |- | ||
|ACTION_MENU_SET_UPGRADE_AVAILABLE | |'''ACTION_MENU_SET_UPGRADE_AVAILABLE''' | ||
|Add or remove an upgrade from a particular Action Menu | |''Add or remove an upgrade from a particular Action Menu'' | ||
|- | |- | ||
|BEAMER_SET_LAYER | |'''BEAMER_SET_LAYER''' | ||
|Set the beamer layer to a specific overlay type | |''Set the beamer layer to a specific overlay type'' | ||
|- | |- | ||
|CINEMATIC_STAKEHOLDER_START | |'''CINEMATIC_STAKEHOLDER_START''' | ||
|Start a cinematic for a specific stakeholder | |''Start a cinematic for a specific stakeholder'' | ||
|- | |- | ||
|CINEMATIC_STAKEHOLDER_STOP | |'''CINEMATIC_STAKEHOLDER_STOP''' | ||
|Stop any cinematic for a specific stakeholder | |''Stop any cinematic for a specific stakeholder'' | ||
|- | |- | ||
|LEVEL_SET_ACTIVE | |'''LEVEL_SET_ACTIVE''' | ||
|Activate a game level | |''Activate a game level'' | ||
|- | |- | ||
|MEASURE_UPDATE_CUSTOM | |'''MEASURE_UPDATE_CUSTOM''' | ||
|Update a custom made measure | |''Update a custom made measure'' | ||
|- | |- | ||
|MESSAGE_ACTIVATE | |'''MESSAGE_ACTIVATE''' | ||
|Activate a specific message | |''Activate a specific message'' | ||
|- | |- | ||
|MESSAGE_REVOKE | |'''MESSAGE_REVOKE''' | ||
|Revoke a message. Effects are not revoked | |''Revoke a message. Effects are not revoked'' | ||
|- | |- | ||
|MESSAGE_RESET | |'''MESSAGE_RESET''' | ||
|Reset a message. Sets the message as inactive and clears the send date. | |''Reset a message. Sets the message as inactive and clears the send date.'' | ||
|- | |- | ||
|SETTINGS_ALLOW_GAME_INTERACTION | |'''SETTINGS_ALLOW_GAME_INTERACTION''' | ||
|Allow interaction with the project during a session, after a pause moment or level switch | |''Allow interaction with the project during a session, after a pause moment or level switch'' | ||
|- | |- | ||
|SETTINGS_SET_MESSAGE_AUTO_RESPOND | |'''SETTINGS_SET_MESSAGE_AUTO_RESPOND''' | ||
|When activated, messages to non-human players and game-leaders are auto responded | |''When activated, messages to non-human players and game-leaders are auto responded'' | ||
|- | |- | ||
|SPECIAL_EFFECT_SET_ACTIVE | |'''SPECIAL_EFFECT_SET_ACTIVE''' | ||
|Activate/deactivate a special effect | |''Activate/deactivate a special effect'' | ||
|- | |- | ||
|TERRAIN_SET_ACTIVE | |'''TERRAIN_SET_ACTIVE''' | ||
|Activate/deactivate a terrain | |''Activate/deactivate a terrain'' | ||
|- | |- | ||
|TERRAIN_SET_POLYGON | |'''TERRAIN_SET_POLYGON''' | ||
|Activate/deactivate a polygon as terrain (Safe Zone, Flood Hazard Zone, etc) | |''Activate/deactivate a polygon as terrain (Safe Zone, Flood Hazard Zone, etc)'' | ||
|- | |- | ||
|TIME_SET_SIM_MULTIPLIER | |'''TIME_SET_SIM_MULTIPLIER''' | ||
|Set the game time multiplier. A value of 1 means that 1 sec in real life is also 1 sec in simulation time. 2 means 1 sec in real life is 2 sec in simulation time | |''Set the game time multiplier. A value of 1 means that 1 sec in real life is also 1 sec in simulation time. 2 means 1 sec in real life is 2 sec in simulation time'' | ||
|- | |- | ||
|UNIT_SET_ACTIVE | |'''UNIT_SET_ACTIVE''' | ||
|Activate/deactivate a unit (vehicles etc) | |''Activate/deactivate a unit (vehicles etc)'' | ||
|- | |- | ||
|WEATHER_SET_DATA | |'''WEATHER_SET_DATA''' | ||
|Set rain data of the weather | |''Set rain data of the weather'' | ||
|- | |- | ||
|ZOOMLEVEL_SET_ACTIVE | |'''ZOOMLEVEL_SET_ACTIVE''' | ||
|Activate or deactivate a zoom level | |''Activate or deactivate a zoom level'' | ||
|} | |} | ||
Revision as of 12:56, 25 August 2015
What is a Server Event
- Main article: Events
Server events are events which are communicated to the server, and may affect all stakeholders. An example of this is the activation of a measure. These events may affect the 3D world and the indicator scores.
How do Server Events relate to the Tygron Engine
Server Events can be used in multiple locations in the Tygron Engine; as part of a measure, at the start of a level, as part of a larger event bundle in the action menu, etc. Server Events allow for events to be triggered during a session, which will result in a reaction from the server.
Different Server Event types
There are two flavors of Server Events: Logic Events and Player Events. The difference between these is that for Player Events at least one dedicated stakeholder needs to be assigned to the Server Event properties. A good example of this is the asking for or receiving of a money transfer (MONEY_TRANSFER_ASK & MONEY_TRANSFER_GIVE) as a Server Event.
Logic Events do not require such a dedicated stakeholder and can be fired without one being assigned as property. A good example of this is the activation of a specific terrain type (TERRAIN_SET_ACTIVE) when creating a flooding as part of a measure. The event CINEMATIC_STAKEHOLDER_START is also a Logic Event Type, because the stakeholder is not a property of the event, but of the linked cinematic.
Logic Event Types
Below is a list describing available Logic Server Event Types:
ACTION_MENU_SET_FUNCTION_AVAILABLE | Add or remove a function from a particular Action Menu |
ACTION_MENU_SET_MEASURE_AVAILABLE | Add or remove a measure from a particular Action Menu |
ACTION_MENU_SET_UPGRADE_AVAILABLE | Add or remove an upgrade from a particular Action Menu |
BEAMER_SET_LAYER | Set the beamer layer to a specific overlay type |
CINEMATIC_STAKEHOLDER_START | Start a cinematic for a specific stakeholder |
CINEMATIC_STAKEHOLDER_STOP | Stop any cinematic for a specific stakeholder |
LEVEL_SET_ACTIVE | Activate a game level |
MEASURE_UPDATE_CUSTOM | Update a custom made measure |
MESSAGE_ACTIVATE | Activate a specific message |
MESSAGE_REVOKE | Revoke a message. Effects are not revoked |
MESSAGE_RESET | Reset a message. Sets the message as inactive and clears the send date. |
SETTINGS_ALLOW_GAME_INTERACTION | Allow interaction with the project during a session, after a pause moment or level switch |
SETTINGS_SET_MESSAGE_AUTO_RESPOND | When activated, messages to non-human players and game-leaders are auto responded |
SPECIAL_EFFECT_SET_ACTIVE | Activate/deactivate a special effect |
TERRAIN_SET_ACTIVE | Activate/deactivate a terrain |
TERRAIN_SET_POLYGON | Activate/deactivate a polygon as terrain (Safe Zone, Flood Hazard Zone, etc) |
TIME_SET_SIM_MULTIPLIER | Set the game time multiplier. A value of 1 means that 1 sec in real life is also 1 sec in simulation time. 2 means 1 sec in real life is 2 sec in simulation time |
UNIT_SET_ACTIVE | Activate/deactivate a unit (vehicles etc) |
WEATHER_SET_DATA | Set rain data of the weather |
ZOOMLEVEL_SET_ACTIVE | Activate or deactivate a zoom level |
Player Event Types
Below is a list describing the available Player Event Types:
ACTION_MENU_SET_ACTIVE
- Set a category of actions available for a stakeholder
MEASURE_CANCEL_CONSTRUCTION
- Cancel a measure planned by a stakeholder while in pre-construction phase
MEASURE_PLAN_CONSTRUCTION
- Plan construction of a measure by a stakeholder that is not yet planned
MESSAGE_NEW
- Send a message between Stakeholders through the message panel
MONEY_TRANSFER_ASK
- Ask for money from one stakeholder to another
MONEY_TRANSFER_GIVE
- Give money from one stakeholder to another
SETTINGS_SET_ALLOWED_WATER_LEVEL_INCREASE
- Set the maximum allowed water rise amount in meters in 'polder water' (= open water)