diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-12 11:05:24 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-12 11:05:24 -0400 |
commit | 4ae12a08265998055627a0530f6e7ef8da5ca2ed (patch) | |
tree | 89ac96e5a050dc5f16bb22941f567b3739cf020a /indra/newview/scripts/lua | |
parent | 034d13bcd77c3cbba00da1ef6c3c59d22f4a689e (diff) |
Add LLAgent.teleport() Lua function
that wraps existing "LLTeleportHandler" LEAP listener.
Diffstat (limited to 'indra/newview/scripts/lua')
-rw-r--r-- | indra/newview/scripts/lua/require/LLAgent.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLAgent.lua b/indra/newview/scripts/lua/require/LLAgent.lua index 07ef1e0b0b..9eebede59f 100644 --- a/indra/newview/scripts/lua/require/LLAgent.lua +++ b/indra/newview/scripts/lua/require/LLAgent.lua @@ -71,4 +71,12 @@ function LLAgent.getAnimationInfo(item_id) return leap.request('LLAgent', {op = 'getAnimationInfo', item_id=item_id}).anim_info end +-- Teleport to specified "regionname" at specified region-relative "x", "y", "z". +-- If "regionname" omitted, teleport to GLOBAL coordinates "x", "y", "z". +function LLAgent.teleport(...) + local args = mapargs('regionname,x,y,z', ...) + args.op = 'teleport' + return leap.request('LLTeleportHandler', args) +end + return LLAgent |