Device Modules


These are a particular type of device setting, which modify your input when they are enabled. Our two main examples are the Player Selector (BP_DeviceModule_PlayerSelector), which allows you to select players, and the Location Selector (BP_DeviceModule_LocationSelector), which allows you to select a location on click (which can then be used similar to other device settings). See the indiviual docs for each to see how to use them, or how to add them to your devices.

Both of these use The BP_Presenter_Selector to handle listening to input. More details on that below:

The BP_Presenter_Selector

The presenter selector is an actor that is configured and spawned by the device modules. This actor handles listening to inputs, and creating visuals in response. It also broadcasts the appropriate events to the device module that can be listened to, e.g. OnSelectLocation for location selection, or OnPlayerSelectionUpdated for when selecting players.

This is used by the device modules by spawning the presenter selector actor on InitializeOnClient, providing the relevant fields, and listening to the relevant events.

Like with other uses of enhanced input and input prioritization, the presenter selection takes an input mapping context and action, and optionally a input prioritization name and priority.

An important thing to note about the input actions taken by the presenter selector is that they must have the "HoldAndRelease" and "Hold" triggers provided. This is because the presenter selector listens to "tap", "hold" and "hold and release" events for the various selection behaviours, and these two triggers enable it to do these. See IA_PresenterSelector1 as an example input used by the presenter selector (mapped to LMB in IMC_DeviceActions_PresenterSelector)

Last updated