31 |
31 |
32 === `trackDeletion(gear)` === |
32 === `trackDeletion(gear)` === |
33 Will stop keeping track of the gear (gears not tracked will be ignored). |
33 Will stop keeping track of the gear (gears not tracked will be ignored). |
34 |
34 |
35 === `trackTeams()` === |
35 === `trackTeams()` === |
36 Will start the tracking of teams, clans and hedgehogs (hogs can be tracked without this). |
36 Will start the tracking of teams, clans and hedgehogs (hogs can be tracked without this). You *must* call this function in `onGameStart` when you want to use any of the team or clan-related functions below. |
37 |
37 |
38 === `trackHiding(gear)` === |
38 === `trackHiding(gear)` === |
39 Will keep track of the given hedgehog gear when it is hidden. |
39 Will keep track of the given hedgehog gear when it becomes hidden (e.g. with `HideHog`). |
40 |
40 |
41 === `trackRestoring(gear)` === |
41 === `trackRestoring(gear)` === |
42 Will keep track of the given hedgehog gear when it is un-hidden. |
42 Will keep track of the given hedgehog gear when it becomes restored, i.e. no longer hidden (e.g. with `RestoreHog`). |
43 |
43 |
44 == “`runOn`” functions == |
44 == “`runOn`” functions == |
45 These functions are used to run a function on tracked gears, teams and clans. |
45 These functions are used to run a function on _tracked_ gears, teams and clans. |
46 |
46 |
47 === `runOnGears(func)` === |
47 === `runOnGears(func)` === |
48 Runs the function `func` on all gears. |
48 Runs the function `func` on all tracked gears. |
49 |
49 |
50 === `runOnHogs(func)` === |
50 === `runOnHogs(func)` === |
51 Runs the function `func` on all hedgehogs. |
51 Runs the function `func` on all tracked hedgehogs. |
52 |
52 |
53 === `runOnHogsInTeam(func, team)` === |
53 === `runOnHogsInTeam(func, team)` === |
54 Runs the function `func` on all hedgehogs in the specified team (`team` = team name). |
54 Runs the function `func` on all tracked hedgehogs in the specified team (`team` = team name). |
55 |
55 |
56 === `runOnHogsInOtherTeams(func, team)` === |
56 === `runOnHogsInOtherTeams(func, team)` === |
57 Runs the function `func` on all hedgehogs but those in the specified team (`team` = team name). |
57 Runs the function `func` on all tracked hedgehogs but those in the specified team (`team` = team name). |
58 |
58 |
59 === `runOnHogsInClan(func, clan)` === |
59 === `runOnHogsInClan(func, clan)` === |
60 Runs the function `func` on all hedgehogs in the specified clan (`clan` = clan ID). |
60 Runs the function `func` on all tracked hedgehogs in the specified clan (`clan` = clan ID). |
61 |
61 |
62 === `runOnHogsInOtherClans(func, clan)` === |
62 === `runOnHogsInOtherClans(func, clan)` === |
63 Runs the function `func` on all hedgehogs but those in the specified clan (`clan` = clan ID). |
63 Runs the function `func` on all tracked hedgehogs but those in the specified clan (`clan` = clan ID). |
64 |
64 |
65 == Helper functions == |
65 == Helper functions == |
66 === `getFirstHogOfClan(clan)` === |
66 === `getFirstHogOfClan(clan)` === |
67 Returns the first hedgehog (alive or not) in the clan with clan ID `clan`. |
67 Returns the first hedgehog (alive or not) in the clan with clan ID `clan`. |
68 |
68 |