Menu
Lumberyard
User Guide (Version 1.13)

Creating Event Generators

An Event Generator is a handler that generates the named event. For example, a pressed key, a held mouse button, or a series of actions on a controller results in the named event.

To add an event generator

  1. Click the plus sign (+) next to Event Generators.

  2. Select an event from the list.

These event generators (InputSubComponents) are categorized in the following manner:

Single Event to Action

Maps a single event to a single action. The following event generators are Single Event to Action:

  • Analog – Analog input events such as a mouse or keyboard.

  • Held – Event that completes when the Input Device Type is held for a specified duration.

  • Pressed – Event that completes when the Input Device Type is pressed.

  • Released – Event that completes when the Input Device Type is released.

Input sub components are objects that have the same lifetime as components and must override Activate and Deactivate.

////////////////////////////////////////////////////////////////////////// // IInputSubComponent void Activate(const AZ::InputEventNotificationId& channelId) override; void Deactivate(const AZ::InputEventNotificationId& channelId) override;
GameplayNotificationBus handlers

These handlers aggregate one more GameplayActionEvents into a single output GameplayActionEvent. They do not listen for raw input like the InputNotificationBus handlers. The following events are ActionNotificationBus handlers:

  • Ordered Event Combination – Combination input event handler that listens for a series of events and then treats them all as one. As long as the events occur in the specified order, the outgoing event will occur. For example, Down then Right then Heavy Punch results in the event Heavy Special Attack. When you add this event generator, it appears in the UI as the first incoming event name followed by an ellipsis ().

  • Unordered Event Combination – Combination input event handler that listens for a combination of events in no particular order as long as they all happen within a specified amount of time. When you add this event generator, it appears in the UI as Unordered combo in n, where n is the value from the property Max delay for all events.

  • Vectorized Event Combination – This class binds three incoming action values to an AZ::Vector3 and sends out a new gameplay event containing that AZ::Vector3.

    Bind to this action by inheriting AZ::ActionNotificationBus<AZ::Vector3>::Handler and connecting to the bus.