Control Maps are used to bind actions (like using an ability or item) to input keys – we’ll use a control map in Real Time Battles to use the base attack without going through the battle menu.
Since we need an Input Key to trigger the base attack, we first have to set up a new one. You can learn more about input keys in this how-to.
New input keys
Open the ORK Framework editor and navigate to Base/Control > Input Keys. You’ll already find a list of basic inputs, without them we wouldn’t have been able to control our game till now.
We will create two new input keys, one to call the battle menu (in Real Time Battles) and one for our control map – so add two new input keys and change the following settings.
- Name
Set to Battle Menu. - Input Origin
Select Key Code. - Positive Key
Select Left Control.
Tip: You can quickly get to the key you want by pressing the first letter of the desired key multiple times, until you reach the correct key. - Negative Key
Select None.
We don’t need this one – we’d use it for axis keys, like horizontal or vertical. - Input Handling
Select Down.
The input will be recognized when the key is pressed down. - Timeout
Set to 0.
That’s it for this input key.
Input Key 6: Attack
- Name
Set to Attack. - Input Origin
Select Key Code. - Positive Key
Select Space. - Negative Key
Select None. - Input Handling
Select Down. - Timeout
Set to 0.
That’s it for this input key.
Create the control map
We can use control maps to start battle actions via input keys. The control maps are bound to a combatant – each combatant can have multiple control maps. Only the combatant currently in the player’s control can use control maps.
We’re going to use a simple control map, that allows us to use the attack command in Real Time Battles. Navigate to Base/Control > Control Maps and change the following settings on the Default control map.
Control Map Settings
- Name
Set to Attack. - Useable In
Enable Real Time.
Disable the rest.
Control Keys
To bind a command/action to an input key, we need to add Control Keys. You can use an input key for multiple control keys – the first action that can be performed (e.g. due to use costs) will be used.
Click on Add Control Key to add one.
The Input Settings define the input key and conditions (e.g. while running or jumping) to trigger the action.
- Input Key
Select Attack. - Is Axis
Disable this setting. - Use Air/Ground
Disable this setting. - Use Speed
Disable this setting.
The Action Settings define what action will be triggered by the input key.
- Type
Select Action.
The type defines what the control key will do, e.g. perform an action (like an attack or ability), use a shortcut slot or toggle the auto attack status. - Action
Select Attack.
This will trigger the combatant’s base attack. - Attack Index
Set to 0.
A combatant can have multiple base attacks – they’ll be used in sequence. - Use Auto Target
Enable this setting.
The action will not bring up a target selection menu – instead a target is selected automatically, based on the combatant’s AI settings.
Since we’re using damage dealers in Real Time Battles, the selected target doesn’t matter – the combatant that will be physically hit by the weapon will receive the damage.
That’s it for the control map.
Add the control map to our hero
The control map is bound to a combatant – in our case, Brown Pants. Navigate to Combatants > Combatants, select Brown Pants and change the following settings.
Base Settings > Control Settings
Click on Add Control Map to add our control map.
- Control Map
Select Attack.
That’s it – click on Save Settings.
And that’s it for now – the next lesson will finally cover real time battles.