summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-10-03 12:24:19 -0400
committergumi <git@gumi.ca>2018-05-26 21:59:44 -0400
commit769e1115ae1dbf41ff213e76d4cf28576e9e8129 (patch)
tree602ee7bfaafe2ff621e9b5cb92ed52691609b96e
parentcb85f3d58787d0f99077836170b9d4a3e9686b45 (diff)
downloadhercules-769e1115ae1dbf41ff213e76d4cf28576e9e8129.tar.gz
hercules-769e1115ae1dbf41ff213e76d4cf28576e9e8129.tar.bz2
hercules-769e1115ae1dbf41ff213e76d4cf28576e9e8129.tar.xz
hercules-769e1115ae1dbf41ff213e76d4cf28576e9e8129.zip
update documentation for buildin_getunits
-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
+---------------------------------------