Menu
Lumberyard
User Guide (Version 1.14)

Event Notification Bus

Use the following notification functions with the event notification bus interface to communicate with other components of your game.

For more information about using the event bus (EBus) interface, see Working with the Event Bus (EBus) System.

InputEventNotificationBus

OnPressed

type: float

Event sent when an input surpasses the threshold.

OnHeld

type: float

Event sent when an input continues to surpass the threshold.

OnReleased

type: float

Event sent when an input no longer surpasses the threshold.

The following is an example script.

local held = { Properties = { IncomingInputEventName = "", OutgoingGameplayEventName = "", }, } function held:OnActivate() local inputBusId = InputEventNotificationId(self.Properties.IncomingInputEventName) self.inputBus = InputEventNotificationBus.Connect(self, inputBusId) end function held:OnHeld(floatValue) GameplayNotificationBus.Event.OnEventUpdating(GameplayNotificationId(self.entityId, self.Properties.OutgoingGameplayEventName), floatValue) end function held:OnReleased(floatValue) GameplayNotificationBus.Event.OnEventEnd(GameplayNotificationId(self.entityId, self.Properties.OutgoingGameplayEventName), floatValue) end function held:OnDeactivate() self.inputBus:Disconnect() end return held