Goto http://www.stucuk.netGoto http://www.atlanticaonlinewiki.comGoto


From Original War Support Wiki

Jump to: navigation, search

SAIL Functions/M -> McRegistry

SAIL Functions/MacrosRelated -> McRegistry

Added In: 1.02



Runs macro for automatic registration of enemies of side in specified intervals and returns mcid.
Every registration gives count and strength of all registered units as its result.

If registration returns different result than the previous (or non-zero in the first registration), it raises an event:

McRegistrationResultChanges(mcid, count, strength)

Value of strength has no real meaning, use it only for comparison with another result of macro or for comparison with zero.


VariableToKeepRegistryID := McRegistry(side:integer, options:plist);

Side is an integer in <1, 8>. It means which side's enemies will be added to this registry (e.g. if 2nd side has enemies in 3rd and 5th side, then if we set it to 2, it will add those from 3rd and 5th).
Options is a list of options (keep it in [ ]!). These are currently available:

[mc_reg_refresh_time, ticks]             interval between two registrations (default 0$1)
[mc_reg_area_to_guard, defarea]          registers enemies in defined area (default none)
[mc_reg_area_to_protect, defarea]        registers enemies attacking units in specified area (default none)
[mc_reg_units_to_protect, listofunits]   registers enemies attacking specified units (default none)
[mc_reg_units_to_guard, listofunits]     registers specified enemies (default none)
[mc_reg_expire_stops_to_attack, ticks]   how long after enemy stops to attack the registration expires (default 0$3)
[mc_reg_expire_leaves_area, ticks]       how long after enemy leaves area the registration expires (default 0$2)
(-)mc_reg_ignore_fog                     ignores the fog so the registry adds all enemies in an area (default false)
(-)mc_reg_only_important                 doesn't raise an event if result changes from non-zero value to another non-zero value (default false)
(-)mc_reg_buildings                      register buildings as well (default false)

If you don't need any options (= default matches your needs), you should leave the list empty. Options in [ ] mean that they need additional parameter (the second one in [ ]). (-) means that this option is true/false. When written with -, it will be set to false, otherwise true. Note that defarea can be given in two formats, as an integer (area identifier) or as [x, y, r].


This function will register all enemies of 3rd side (even those unseen because of mc_reg_ignore_fog) which are (for example) 1st and 2nd and additionally characters: "Billy" and "Gary". It will store this registry ID in "reg" variable.

 reg := McRegistry(3, [mc_reg_ignore_fog, [mc_reg_units_to_guard, [Billy, Gary]]]);

See also


Personal tools
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Cannot contact the database server: MySQL functions missing, have you compiled PHP with the --with-mysql option? )

You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.