forked from davidmoreno/behaviours
-
Notifications
You must be signed in to change notification settings - Fork 1
Accessing to nodes and attributes
David Moreno Montero edited this page May 22, 2013
·
1 revision
In behaviours there are several ways to access the nodes and its attributes.
Each programming language (C++, LUA or Python) have different specific ways to access the data, but all them share the same semantics for object discovery. There are several rules, described by preference.
- The special symbol '_' is access to the last executed node in the path. In the example, when at LUA node (bot.say), _ means the alarm node.
- By type, it walks back the path and returns the first fit.
- Globally access by name
- Globally access by type. If several of the same type returns one at random; if only one, it returns that one.