summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-02-24 13:04:34 -0500
committergumi <mekolat@users.noreply.github.com>2017-02-25 19:28:44 -0500
commiteb5fc0076764d2f604e6a484fe144988f6e9da9b (patch)
treeb1cb6b13d32b17506ca92ba4a65f03a238a1b239 /doc
parent9a7a165d4dbad598907d3ecd54196e8f76c4f3f5 (diff)
downloadhercules-eb5fc0076764d2f604e6a484fe144988f6e9da9b.tar.gz
hercules-eb5fc0076764d2f604e6a484fe144988f6e9da9b.tar.bz2
hercules-eb5fc0076764d2f604e6a484fe144988f6e9da9b.tar.xz
hercules-eb5fc0076764d2f604e6a484fe144988f6e9da9b.zip
allow to get vars of other players with getd
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 1737f8796..a26482672 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1371,10 +1371,11 @@ Examples:
---------------------------------------
-*getd("<variable name>")
+*getd("<variable name>"{, <GID>{, <default value>}})
Returns a reference to a variable, the name can be constructed dynamically.
-Refer to setd() for usage.
+If <GID> is present, it can be used to get a variable from another player or
+npc. If the target player or npc is not found, <default value> is returned.
This can also be used to set an array dynamically:
setarray(getd(".array[0]"), 1, 2, 3, 4, 5);