8️⃣Timed Events

PERFORMANCE TIP In multiplayer Experiences, there are two layers of logic that will not communicate with each other: singleplayer [SP] and multiplayer [MP]. For best performance, only apply [MP] behaviours and components to objects that MUST be synchronised to all players (or communicate on that layer), and maximise use of the [SP] (Client Only) layer.

USAGE TIP This behaviour will not communicate with Quests or [SP] behaviours or components. It can be used in singleplayer Experiences.

Common Uses

Communications

Inputs:

Outputs:

Parameters

OptionsDetails

A Behaviour used to create message triggered once a time has been reached.

WHAT IS IT?

The Timed Events Behaviour offers multiple ways to customise timers that can be used to trigger messages. These timers can be singular or repeating, and a parent timer within the behaviour can also house multiple sub-event timers.The flexibility of this tool makes it ideal for creating environmental cycles, periodic logic checks, and dynamic quest mechanics.The Timed Events Behaviour isn’t a visible countdown. All values set in the Properties Panel define variables that happen ‘behind the scenes’ and won't be displayed on the user interface.

A MULTI-PLAYER BEHAVIOUR

If the Multiplayer version of this Behaviour has been selected, then the progression of an active Timed Event will be synchronized for ALL players, and the resulting messages sent by the Behaviour will also be synchronized for ALL players.For example, if a Timed Event sends messages for a [MP] Door Behaviour to open periodically, the progress of the Timed Event and the moment the Door Behaviour triggers will be experienced by ALL players simultaneously.Messages sent by Multiplayer Behaviours or Components can only be received by other Multiplayer Behaviours and Components. A Client Only Behaviour or Component can’t receive messages or send messages to a Multiplayer one.

APPLYING THE BEHAVIOUR

Timed Event Parameters

Wait for Message [Toggle]

If Wait for Message is set to ‘TRUE’, a message can be added that can be used to trigger the start of the Behaviour.If Wait for Message is set to ‘FALSE’, the Behaviour will start when the experience loads.

Reset (TOGGLE)

When set to ‘TRUE’, the Timed Events Behaviour will start again after all Timed Events, and Sub Events have expired.If the Reset Toggle is set to ‘FALSE’, then the Timed Event will need to be re-triggered to start again. Otherwise, it will remain inactive.ALLTimed Events AND Sub-Events need to elapse before the RESET triggers.

Types of Timed Events

This Behaviour has two key categories - Timed Events and Sub Events.Timed Events define the Primary Timer, which is the linear progression of time, in seconds, from the moment the Behaviour is activated to the moment the last timer has completed.Sub Events are created 'within' a Timed Event and only start once the parent Timed Event has been triggered. This means the time of a Sub-Event is set in reference to the triggering of the parent Timed Event, not in reference to the Primary Timer.

Timed Events

Timed Events define the moment at which a message is sent in reference to the Primary Timer, which is the elapsed time from the moment the Behaviour is triggered.A looping Timed Event used to send 3 different messages to an Animated Decoration Behaviour triggering 3 different animations.There can be multiple Timed Events within a single Behaviour, each defining the primary timeline.The order of the Timed Events is chronological, so even if one is created before another, the order will change based on the time assigned to them.For example, if Timed Event 1 is set to 00:01 and Timed Event 2 is set to 00:02, then Timed Event 1 will be both listed first AND triggered first.However, if the Time for Timed Event 1 is changed to 00:03, then Timed Event 2 will move up in order, and Timed Event 1 will be triggered second.Timed Events won't change their listing order in the Properties Panel until after the Behaviour has been run in Play Mode.

Sub Events

Sub Events are ‘children’ of the primary Timed Event and will trigger relative to the elapsed time of the parent.Animations triggered by Timed Events (GREEN) and Sub Events (BLUE) - all in one Timed Event BehaviourFor example, if a Timed Event is set to trigger at 10 seconds, its first Sub Event won't start until 10 seconds have elapsed.

Timer Settings

Event Name

By default, the Timer name will be set to Element followed by a number until it has been customised.The name of the Timer won't appear ‘in-game’, but giving each Timed Event and Sub Event a clear name will help make each trigger identifiable, especially as events will move position if their times are changed.

Time and Relative Time:

This is where the trigger Time of Timed Events and triggers for Relative time on Sub Events are set.Two fields are available in this section - the left is measured in minutes, and the right is measured in seconds. Each field has a maximum value of 59.Once a time has been entered in these fields, it will also be added to the Event Name.If the time set is smaller or greater than Timed Events or Sub events before or after it, it will change position in the list.When the timer is activated, it will not be visible to the players.

Message:

This is the message the Timed Event or Sub Event will broadcast when the set Time has been reached.Create a new message or click on the field to access the drop-down menu containing existing messages.Keep in mind messages are space and case-sensitive.

Tags:

Allows you to set the specific actors targeted by the message sent when the time is reached.

ADD TIMED EVENT & SUB EVENT

Last updated

Logo

Copyright © 2012- 2023 The Sandbox. All Rights Reserved.