In this tutorial we’ll set up control maps, use ranges and a real time battle area.
This tutorial is part 2 of a mini-series covering real time battles with tab targeting. You can find the start of this series here.
We’ll set up a control map for gamepad, use ranges for abilities and items and a Real Time Battle Area to fight real time battles in the entire scene.
This tutorial is based on the ORK 4 Unity Quickstart 3D tutorials using gamepad controls (with combined inputs), cast times and spawning enemies, but can be used in any project.
Control Map #
Follow this control map for gamepad tutorial to set up shortcut assignments and a control map for gamepad controls in your project.
If you prefer using keyboard keys, you can follow this control map for keyboard tutorial.
Use Ranges #
Before doing a first test, we need to update the use ranges of our abilities and items. Otherwise player and enemies could target each other over the entire scene.
We’ll set up the default use range of 2 for abilities and items, and have magic abilities override it with a use range of 5 (via their content types spells and support).
Default Use Range #
Navigate to Battles > Battle Actions.
If you’ve followed the grid battle tutorials, you’ll already have a use range set up that’s only used by grid battles. That’s no problem for our setup.
Click on Add Use Range.
- Range Type
Select: Template - Template
Select: Range 3
We’ll set the Use In settings to only use this use range in real time battles.
- Field
Disable - All Battle Systems
Disable - Grid Battles
Select: No
Click on Add Battle System.
- Battle System
Select: Real Time
Update Content Types #
We’ll use the content types Spells and Support to add a use range override for all magic abilities.
Navigate to Content > Content Types. The setup is the same for both types.
Base Settings > Use Range Settings #
We’ll override the default use range – this will also overrule the use range defined by the type’s Target Selection Settings.
- Own Use Range
Enable
Click on Add Range.
- Range Type
Select: Template - Template
Select: Range 5
We’ll set the Use In settings to only use this use range in real time battles.
- Field
Disable - All Battle Systems
Disable - Grid Battles
Select: No
Click on Add Battle System.
- Battle System
Select: Real Time
Don’t forget that you can use the context menu to copy/paste settings, making the setup of the 2nd type easier.
Save Changes #
That’s it for now – we’ll continue with setting up real time battles in the scene.
Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.
Real Time Battle Areas #
We’ll add a scene-wide real time battle to the World scene. You should already have set up enemy spawning.
Real time battles can be added in different ways, either like all other battle systems (e.g. via Battle component, Random Battle Area component or combatant spawners) or using Real Time Battle Area components. The real time battle areas can either work in the entire scene by not adding an area (Unity: collider with Is Trigger enabled) or only for the added area.
We’ll add a real time battle area for the entire scene, either use the scene hierarchy context menu (ORK Framework > Battle > Real Time Battle Area (Scene)) or the ORK toolbar (search for: Real Time Scene).
And that’s all we need to do, don’t forget to save the changes to the scene.
Testing #
Hit play and test the real time battles.
It’s working, but there are some problems:
- we can’t rotate the camera using the gamepad
- battle AI doesn’t care if the enemy has detected us
- abilities are spammed by enemies
So, let’s work on fixing those issues in the next part of the real time mini-series.


