Introduction Edit

Below is a list of functions and their explanation which are useful for map scripts.

GetFocusArmy() Edit

returns the id of the army the player is controlling. e.g. if there are four players in the game, it returns 1, 2, 3 or 4. it does NOT return the slot number (e.g. 1-8 in an 8-player map), and it does also NOT return the army name you have defined in the editor (e.g. ARMY_3)

ListArmies() Edit

returns a list of armies in the game. this will return the NAME of the armies you specified in the editor (e.g. ARMY_1)

example, 8 player map, slots ARMY_1 to ARMY_8.

ARMY_1 is occupied with an AI player

ARMY_6 is occupied with you

then the code

    	for i, army in ListArmies() do
    		LOG("ListArmies i: "..i.." army ";

will result in: ListArmies i: 1 army ARMY_1 ListArmies i: 2 army ARMY_6

dummy Edit

next func here

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.