summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/script_commands.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index aa0fea31c..eb0f2a78a 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3357,12 +3357,13 @@ Examples:
---------------------------------------
-*getunits(<type>, <variable>, <limit>, "<map>"{, <x1>, <y1>, <x2>, <y2>})
+*getunits(<type>, <variable>, <limit>{, "<map>"{, <x1>, <y1>, <x2>, <y2>}})
This function searches a whole map or area for units and adds their GID to
the provided <variable> array. It filters units by <type> and stops searching
after <limit> units have been found. Set <limit> to false (0) if you wish to
-disable the limit altogether.
+disable the limit altogether. If <map> is omitted, this command will search
+on the whole server (slow). Returns the number of units added to the array.
Type is the type of unit to search for:
@@ -3381,6 +3382,10 @@ Type is the type of unit to search for:
** Do NOT use UNITTYPE_ constants here, they have different values.
+** If battle_config.dynamic_mobs is enabled and no player has entered the map
+ yet, the mobs will not have spawned in the map yet, so getunits() will be
+ unable to find them when searching for BL_MOB.
+
Example:
.@count = getunits((BL_PC | BL_NPC), .@units, false, "prontera");
@@ -10007,4 +10012,4 @@ the available flags are:
P_AIRSHIP_ITEM_NOT_ENOUGH
P_AIRSHIP_ITEM_INVALID
---------------------------------------- \ No newline at end of file
+---------------------------------------