Client Event: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
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 the flashing of an [[Actions|action]] menu or an [[Indicators|indicator]] to draw the user's attention, or the visualization of a [[Weather|weather]] effect, such as a rain storm.
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 the flashing of an [[Actions|action]] menu or an [[Indicators|indicator]] to draw the user's attention, or the visualization of a [[Weather|weather]] effect, such as a rain storm.


==How do Server Events relate to the Tygron Engine==
==How do Client Events relate to the Tygron Engine==
Client Events can be used on multiple locations in the Tygron Engine; as part of a [[Measures|measure]], as part of a larger [[Events#Event Bundles|event bundle]] in the [[Actions|action]] menu, or during a [[Cinematics|cinematic sequence]]. Client Events do not communicate with the server, but trigger a reaction locally on the user's system.
Client Events can be used on multiple locations in the Tygron Engine; as part of a [[Measures|measure]], as part of a larger [[Events#Event Bundles|event bundle]] in the [[Actions|action]] menu, or during a [[Cinematics|cinematic sequence]]. Client Events do not communicate with the server, but trigger a reaction locally on the user's system.


==Different Server Event types==
==Different Client 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 [[Terrains#Flood Terrain|flooding]] as part of a measure. Events like CINEMATIC_STAKEHOLDER_START are also Logic Event Types, because the stakeholder is not a property of the event, but of the linked cinematic.
Below is a list describing the available Client Event Types:
===Logic Event Types===
Below is a list describing the available Logic Server Event Types:
{| class="wikitable"
{| class="wikitable"
|-
|-
|'''ACTION_MENU_SET_FUNCTION_AVAILABLE'''
|'''ACTIVATE_WEATHER'''
|''Add or remove a function from a particular Action Menu''
|''Activate the selected weather type on the client system''
|-
|-
|'''ACTION_MENU_SET_MEASURE_AVAILABLE'''
|'''ACTIVATE_VIDEO'''
|''Add or remove a measure from a particular Action Menu''
|''Activate video player on the client system with selected video loaded''
|-
|-
|'''ACTION_MENU_SET_UPGRADE_AVAILABLE'''
|'''BLINK_INDICATOR'''
|''Add or remove an upgrade from a particular Action Menu''
|''Make the selected indicator icon on the client system blink, to attract the user's attention''
|-
|-
|'''BEAMER_SET_LAYER'''
|'''BLINK_OVERLAY'''
|''Set the beamer layer to a specific overlay type''
|''Make the selected overlay icon on the client system blink, to attract the user's attention''
|-
|-
|'''CINEMATIC_STAKEHOLDER_START'''
|'''BLINK_CATEGORY'''
|''Start a cinematic for a specific stakeholder''
|''Make the selected action menu category icon on the client system blink, to attract the user's attention''
|-
|-
|'''CINEMATIC_STAKEHOLDER_STOP'''
|'''BLINK_STOP_ALL'''
|''Stop any cinematic for a specific stakeholder''
|''Cancel all the blinking of icons''
|-
|-
|'''LEVEL_SET_ACTIVE'''
|'''CHANGE_ZONE_PERMIT'''
|''Activate a game level''
|''Change the zoning permit for the selected zone ID''
|-
|-
|'''MEASURE_UPDATE_CUSTOM'''
|'''FEEDBACK_PANEL_SHOW_TEXT'''
|''Update a custom made measure''
|''Display the entered text on a small panel on the bottom of the main project view''
|-
|-
|'''MESSAGE_ACTIVATE'''
|'''FEEDBACK_PANEL_HIDE_TEXT'''
|''Activate a specific message''
|''Remove the feedback panel from the main project view''
|-
|-
|'''MESSAGE_REVOKE'''
|'''FORCE_ACTIVATE_VIDEO'''
|''Revoke a message. Effects are not revoked''
|''Force a selected video to play on the client system''
|-
|-
|'''MESSAGE_RESET'''
|'''GOTO_START_LOCATION'''
|''Reset a message. Sets the message as inactive and clears the send date.''
|''Sets the user's view point to a predefined starting position''
|-
|-
|'''SETTINGS_ALLOW_GAME_INTERACTION'''
|'''MESSAGE_ANSWERED'''
|''Allow interaction with the project during a session, after a pause moment or level switch''
|''Sends a standard reply to a message, based on the selected Answer ID''
|-
|-
|'''SETTINGS_SET_MESSAGE_AUTO_RESPOND'''
|'''MESSAGE_MOTIVATION_ANSWER'''
|''When activated, messages to non-human players and session facilitators are automatically replied to''
|''Sends a standard reply to a message, based on the selected Answer ID, with a separate motivation text added''
|-
|-
|'''SPECIAL_EFFECT_SET_ACTIVE'''
|'''RANDOM_ACTIVATE_POPUP_PERCENTAGE'''
|''Activate/deactivate a special effect''
|''...''
|-
|-
|'''TERRAIN_SET_ACTIVE'''
|'''SELECT_HOTSPOT'''
|''Activate/deactivate a terrain''
|''Activate the selected popup panel''
|-
|-
|'''TERRAIN_SET_POLYGON'''
|'''SET_VISUALIZATION_SPEED'''
|''Activate/deactivate a polygon as terrain (Safe Zone, Flood Hazard Zone, etc)''
|''In- or decrease the visualization speed with a factor between 0 and 1''
|-
|-
|'''TIME_SET_SIM_MULTIPLIER'''
|'''SHOW_BROWSER_MAP'''
|''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''
|''Open a new window containing the ArcGIS map of the project area''
|-
|-
|'''UNIT_SET_ACTIVE'''
|'''SHOW_OVERLAY'''
|''Activate/deactivate a unit (vehicles etc)''
|''Activate the selected overlay''
|-
|-
|'''WEATHER_SET_DATA'''
|'''SHOW_PANEL'''
|''Set rain data of the weather''
|''Activate the selected panel''
|-
|-
|'''ZOOMLEVEL_SET_ACTIVE'''
|'''STOP_WEATHER'''
|''Activate or deactivate a zoom level''
|''Halt any previously activated weather''
|}
 
===Player Event Types===
Below is a list describing the available Player Event Types:
{| class="wikitable"
|-
|'''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'''
|'''TILE_ATTENTION'''
|''Set the maximum allowed water rise amount in meters in 'polder water' (= open water)''
|''...''
|}
|}


==Adding Server Side Events to a project==
==Adding Client Events to a project==
[[File:LevelsEventBundles-Q3-2015.jpg|frame|right|Add events to a level ([[Right Panel|right panel]])]]
[[File:LevelsEventBundles-Q3-2015.jpg|frame|right|Add events to a level ([[Right Panel|right panel]])]]
[[File:ServerEventButtons-Q3-2015.jpg|frame|right|Add & Remove Event buttons ([[Right Panel|right panel]])]]
[[File:ServerEventButtons-Q3-2015.jpg|frame|right|Add & Remove Event buttons ([[Right Panel|right panel]])]]
Line 116: Line 90:
{{Editor steps|title=add events to a project element|Select Project Element to have events added to|Select the Event option on the left panel|Select 'Add event' on the bottom of the right panel|Select the newly added event on the right panel|Select the desired server event from the bottom  panel|Confirm the selection with the 'Commit' button (or use the 'Cancel' button to clear the selection}}
{{Editor steps|title=add events to a project element|Select Project Element to have events added to|Select the Event option on the left panel|Select 'Add event' on the bottom of the right panel|Select the newly added event on the right panel|Select the desired server event from the bottom  panel|Confirm the selection with the 'Commit' button (or use the 'Cancel' button to clear the selection}}


==Changing the properties of a Server Side Event in a project==
==Changing the properties of a Client Event in a project==
The properties of events can be edited on the bottom panel (see image above). On this panel a linked ID of a measure or cinematic can be linked to an event for instance. Also can a dedicated stakeholder be selected here for Player Type Events. Again, any changed made need to be confirmed first with the 'Commit' button, or cancelled with the 'Cancel' button.
The properties of events can be edited on the bottom panel (see image above). On this panel a linked ID of a measure or cinematic can be linked to an event for instance. Also can a dedicated stakeholder be selected here for Player Type Events. Again, any changed made need to be confirmed first with the 'Commit' button, or cancelled with the 'Cancel' button.

Revision as of 09:39, 26 August 2015

Please note: This page is currently being updated.

Template:Learned

What is a Client Event

Main article: 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 the flashing of an action menu or an indicator to draw the user's attention, or the visualization of a weather effect, such as a rain storm.

How do Client Events relate to the Tygron Engine

Client Events can be used on multiple locations in the Tygron Engine; as part of a measure, as part of a larger event bundle in the action menu, or during a cinematic sequence. Client Events do not communicate with the server, but trigger a reaction locally on the user's system.

Different Client Event types

Below is a list describing the available Client Event Types:

ACTIVATE_WEATHER Activate the selected weather type on the client system
ACTIVATE_VIDEO Activate video player on the client system with selected video loaded
BLINK_INDICATOR Make the selected indicator icon on the client system blink, to attract the user's attention
BLINK_OVERLAY Make the selected overlay icon on the client system blink, to attract the user's attention
BLINK_CATEGORY Make the selected action menu category icon on the client system blink, to attract the user's attention
BLINK_STOP_ALL Cancel all the blinking of icons
CHANGE_ZONE_PERMIT Change the zoning permit for the selected zone ID
FEEDBACK_PANEL_SHOW_TEXT Display the entered text on a small panel on the bottom of the main project view
FEEDBACK_PANEL_HIDE_TEXT Remove the feedback panel from the main project view
FORCE_ACTIVATE_VIDEO Force a selected video to play on the client system
GOTO_START_LOCATION Sets the user's view point to a predefined starting position
MESSAGE_ANSWERED Sends a standard reply to a message, based on the selected Answer ID
MESSAGE_MOTIVATION_ANSWER Sends a standard reply to a message, based on the selected Answer ID, with a separate motivation text added
RANDOM_ACTIVATE_POPUP_PERCENTAGE ...
SELECT_HOTSPOT Activate the selected popup panel
SET_VISUALIZATION_SPEED In- or decrease the visualization speed with a factor between 0 and 1
SHOW_BROWSER_MAP Open a new window containing the ArcGIS map of the project area
SHOW_OVERLAY Activate the selected overlay
SHOW_PANEL Activate the selected panel
STOP_WEATHER Halt any previously activated weather
TILE_ATTENTION ...

Adding Client Events to a project

As mentioned above, events can be added to a project element on multiple occasions and locations. Please refer to the main article relating to these elements for more information about the specific steps to take.

In general, adding Events to an element in the Tygron Engine happens on the right panel, after selecting the element (ex. measures, levels, etc) to have an event added to on the left panel first. Select on the right panel bottom the 'Add Event' button; a default blank event named NO_DEF is created in the list above the buttons. Selecting an Event on the list and using the 'Remove Event' button deletes the event from the list.

Selecting an event on the right panel also opens up the bottom panel where the actual event type can be selected. This selection can then be confirmed on the bottom panel by using the 'Commit' button. The 'Cancel' button clears the selection on the bottom panel.

Event bundle bottom panel with 'Commit' and 'Cancel' buttons


How to add events to a project element:
  1. Select Project Element to have events added to
  2. Select the Event option on the left panel
  3. Select 'Add event' on the bottom of the right panel
  4. Select the newly added event on the right panel
  5. Select the desired server event from the bottom panel
  6. Confirm the selection with the 'Commit' button (or use the 'Cancel' button to clear the selection

Changing the properties of a Client Event in a project

The properties of events can be edited on the bottom panel (see image above). On this panel a linked ID of a measure or cinematic can be linked to an event for instance. Also can a dedicated stakeholder be selected here for Player Type Events. Again, any changed made need to be confirmed first with the 'Commit' button, or cancelled with the 'Cancel' button.