TinyMARE HelpText

Global Functions > Rloc()

Rloc()

rloc(<object>, <levels>)

Powers: Functions

This function can be used to recursively get <object>'s location up to 100 levels of recursion. The <levels> parameter indicates the number of nested [loc()] calls to make on <object>, except that this function allows you to take the location of objects that would previously fail if you can not control <object>'s location. For example, [loc(loc(<object>))] could be replaced with [rloc(<object>,2)].

[rloc(<object>,0)] is the same as [num(<object>)], and [rloc(<object>,1)] is the same as [loc(<object>)].

Example:

  > say [num(me)] = [type(me)]
  You say, "#100 = Player"
  > say [loc(me)] = [type(loc(me))]
  You say, "#188 = Thing"
  > say [loc(loc(me))] = [type(loc(loc(me)))]
  You say, "#186 = Room"
  > @foreach 0 1 2 3=say [rloc(me,v(0))]
  You say, "#100 #188 #186 #186"

Errors:

"#-1 Too far away to see." - The <object> isn't in your immediate vicinity.

See also: loc(), room()

From the TinyMARE Help command - Courtesy Gandalf

-- SluggyQBFreak - 17 Feb 2017

This topic: TinyMARE > HelpText > FunctionRloc
Topic revision: 17 Feb 2017, SluggyQBFreak
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiMARE? Send feedback