Server Events: Difference between revisions
Line 105: | Line 105: | ||
==Adding Server Side Events to a project== | ==Adding Server Side Events to a project== | ||
{{:Event|create=true||item=project|serveronly=true|panel=blub.jpg|description=By selecting the Event Bundles option of a level, it is possible to add Server events to a level; send automatically a message to a stakeholder, make more action menus available, etc. These events will be triggered as soon as the new level starts.|list-image=LevelsEventBundles-Q3-2015.jpg|list-caption=Add events to a level|list-name=Server Events fired when chosen:}} | {{:Event|create=true||item=project|serveronly=true|panel=blub.jpg|description=By selecting the Event Bundles option of a level, it is possible to add Server events to a level; send automatically a message to a stakeholder, make more action menus available, etc. These events will be triggered as soon as the new level starts.|list-image=LevelsEventBundles-Q3-2015.jpg|list-caption=Add events to a level|list-name=Server Events fired when chosen:}} | ||
----- | |||
{{:Event|edit=true|nomain=true}} | {{:Event|edit=true|nomain=true}} | ||
==Changing the properties of a Server Side Event in a project== | ==Changing the properties of a Server Side Event in a project== |
Revision as of 13:19, 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 Event Types is that for Player Events at least one dedicated stakeholder needs to be assigned to the Server Event itself as event property. 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 session facilitators are automatically replied to |
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) |
Adding Server Side Events to a project
Events in the Tygron Platform are instructions to the software. An event has to be predefined. It will only have an effect when the event is fired. A number of occurrences in the Tygron Platform can cause events to be fired. Examples include the planning and canceling of a measure, or applying an event bundle as an action.
An event has a type and parameters, which specify what the effect of the event is. There are many event types, with many different effects.
Events are very basic instructions for the Tygron Platform to execute. For this reason, they can only be predefined by editing users. But by using events, it is possible to make a project more complex and help automate events that occur when activating scenarios.
Where events can be used
Places where events can be triggered are:
- the change of state of measures
- the activation of scenarios
- the activation of event bundles
Event Bundles
It is also possible to create event bundles. Event bundles are collections of events that can be triggered as one package. The advantage over loose events is that event bundles can be triggered by multiple sources. Event bundles can be used to trigger events at specific points during a cinematic. Additionally, event bundles can also be added to action menus of stakeholders. This means that it's possible to provide users with an option, solely to fire events. This can be useful to let a Stakeholder re-watch a cinematic or to automatically activate multiple measures.
Server events and client events
There are two kinds of events: server events and client events.
Server Events
- Main article: Server Events.
Server events are events which are communicated to the server, and may have effects for all stakeholders. An example of this is the activation of a measure. This may affect the project data and the indicator scores; changes which are also visible and possibly important to other stakeholders.
Client Events
- Main article: Client Events.
Client events are not communicated to the server and and are usually a graphical effect for the stakeholder who triggered the event. Examples of this include flashing an action menu to draw the user's attention, or the visualization of a weather effect.
Adding and removing event bundles
You can create (empty) event bundles, which events can then be added to. An event bundle which does not contain events can be used as any other event bundle, but will have no effects.
- In the ribbon header, select "Stakeholders".
- In the ribbon bar, select "Event Bundles".
- In the left panel, select "Add".
- In the ribbon header, select "Stakeholders".
- In the ribbon bar, select "Event Bundles".
- In the left panel, select the event bundle you wish to duplicate.
- In the left panel, select "Duplicate".
- In the ribbon header, select "Stakeholders".
- In the ribbon bar, select "Event Bundles".
- In the left panel, select the event bundle you wish to remove.
- In the left panel, select "Remove".
Adding, removing and editing events
Because events can be added to, and removed from several types of items in a project, please see the respective articles on those items for more information on where to add and remove events. For example, if you wish to add an event to a measure, please see the article on measures. Similarly, for information on how to connect event bundles to elements in a project, please see the respective articles on those elements for more information.
For the exact steps for adding, removing, and changing events, please see Editing Events.
Events in the Tygron Platform are instructions to the software. An event has to be predefined. It will only have an effect when the event is fired. A number of occurrences in the Tygron Platform can cause events to be fired. Examples include the planning and canceling of a measure, or applying an event bundle as an action.
An event has a type and parameters, which specify what the effect of the event is. There are many event types, with many different effects.
Events are very basic instructions for the Tygron Platform to execute. For this reason, they can only be predefined by editing users. But by using events, it is possible to make a project more complex and help automate events that occur when activating scenarios.
Where events can be used
Places where events can be triggered are:
- the change of state of measures
- the activation of scenarios
- the activation of event bundles
Event Bundles
It is also possible to create event bundles. Event bundles are collections of events that can be triggered as one package. The advantage over loose events is that event bundles can be triggered by multiple sources. Event bundles can be used to trigger events at specific points during a cinematic. Additionally, event bundles can also be added to action menus of stakeholders. This means that it's possible to provide users with an option, solely to fire events. This can be useful to let a Stakeholder re-watch a cinematic or to automatically activate multiple measures.
Server events and client events
There are two kinds of events: server events and client events.
Server Events
- Main article: Server Events.
Server events are events which are communicated to the server, and may have effects for all stakeholders. An example of this is the activation of a measure. This may affect the project data and the indicator scores; changes which are also visible and possibly important to other stakeholders.
Client Events
- Main article: Client Events.
Client events are not communicated to the server and and are usually a graphical effect for the stakeholder who triggered the event. Examples of this include flashing an action menu to draw the user's attention, or the visualization of a weather effect.
Adding and removing event bundles
You can create (empty) event bundles, which events can then be added to. An event bundle which does not contain events can be used as any other event bundle, but will have no effects.
- In the ribbon header, select "Stakeholders".
- In the ribbon bar, select "Event Bundles".
- In the left panel, select "Add".
- In the ribbon header, select "Stakeholders".
- In the ribbon bar, select "Event Bundles".
- In the left panel, select the event bundle you wish to duplicate.
- In the left panel, select "Duplicate".
- In the ribbon header, select "Stakeholders".
- In the ribbon bar, select "Event Bundles".
- In the left panel, select the event bundle you wish to remove.
- In the left panel, select "Remove".
Adding, removing and editing events
Because events can be added to, and removed from several types of items in a project, please see the respective articles on those items for more information on where to add and remove events. For example, if you wish to add an event to a measure, please see the article on measures. Similarly, for information on how to connect event bundles to elements in a project, please see the respective articles on those elements for more information.
For the exact steps for adding, removing, and changing events, please see Editing Events.