Developer Guide (Version 1.11)

Action Maps


Lumberyard's Input component replaces legacy action maps. For more information, see Input in the Amazon Lumberyard User Guide.

The Action Map Manager provides a high-level interface to handle input controls inside a game. The Action Map system is implemented in Lumberyard, and can be used directly by any code inside Lumberyard or the GameDLL.

Initializing the Action Map Manager

The Action Map Manager is initialized when Lumberyard is initialized. Your game must specify the path for the file defaultProfile.xml (by default, the path is Game/Libs/Config/defaultProfile.xml). You can do this by passing the path to the manager. For example:

IActionMapManager* pActionMapManager = m_pFramework->GetIActionMapManager(); if (pActionMapManager) { pActionMapManager->InitActionMaps(filename); }

Upon initialization, the Action Map Manager clears all existing initialized maps, filters, and controller layouts.

Receiving Actions During Runtime

You can enable the feature that allows action maps to receive actions during runtime. Use the following code to enable or disable an action map during runtime:

pActionMapMan->EnableActionMap("default", true);

To receive actions, implement the IActionListener interface in a class.