API:GetActiveTactics
From RoR Wiki
UI Lua API · Game functions
Version: WAR 1.4.8
Returns the ability ids of the tactics the player has slotted.
tactics = GetActiveTactics()
Arguments
None.
Returns
- tactics
table– Array of ability ids (number), indexed from 1.
Details
- The result has the same form as GetTacticsSet, and the stock UI passes it straight to SaveTacticsSet.
- Use GetAbilityData to get details of each tactic.
Errors
None.
Example
Building a lookup of active tactics, from ea_tacticswindow/source/tacticswindow.lua:
local activeTactics = GetActiveTactics ();
local activeCount = 0;
local activeLookup = {};
for k, v in pairs (activeTactics) do
activeCount = activeCount + 1;
activeLookup[v] = k;
Saving the active tactics as set 0, from the same file:
SaveTacticsSet (0, GetActiveTactics());
