From 769e1115ae1dbf41ff213e76d4cf28576e9e8129 Mon Sep 17 00:00:00 2001 From: gumi Date: Tue, 3 Oct 2017 12:24:19 -0400 Subject: update documentation for buildin_getunits --- doc/script_commands.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'doc/script_commands.txt') 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(, , , ""{, , , , }) +*getunits(, , {, ""{, , , , }}) This function searches a whole map or area for units and adds their GID to the provided array. It filters units by and stops searching after units have been found. Set to false (0) if you wish to -disable the limit altogether. +disable the limit altogether. If 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 +--------------------------------------- -- cgit v1.2.3-60-g2f50