Server Events: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Line 23: Line 23:
:''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====



Revision as of 12:05, 25 August 2015

Please note: This page is currently being updated.

Template:Learned

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. 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.

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

MEASURE_UPDATE_CUSTOM

MESSAGE_ACTIVATE

MESSAGE_REVOKE

MESSAGE_RESET

SETTINGS_ALLOW_GAME_INTERACTION

SETTINGS_SET_MESSAGE_AUTO_RESPOND

SPECIAL_EFFECT_SET_ACTIVE

TERRAIN_SET_ACTIVE

TERRAIN_SET_POLYGON

TIME_SET_SIM_MULTIPLIER

UNIT_SET_ACTIVE

WEATHER_SET_DATA

ZOOMLEVEL_SET_ACTIVE

Player Event Types

ACTION_MENU_SET_ACTIVE

MEASURE_CANCEL_CONSTRUCTION

MEASURE_PLAN_CONSTRUCTION

MESSAGE_NEW

MONEY_TRANSFER_ASK

MONEY_TRANSFER_GIVE

SETTINGS_SET_ALLOWED_WATER_LEVEL_INCREASE

Adding Server Side Events to a project

Changing the properties of a Server Side Event in a project