sit

From SmartBots Developers Docs
Bot PlaygroundEvents
Revision as of 18:26, 11 July 2016 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:sit}} <onlyinclude>Fires when bot sits on the object</onlyinclude> <syntaxhighlight lang="javascript"> Bot.on("sit", function(event) { ... }); </syntaxhighligh...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Fires when bot sits on the object

Bot.on("sit", function(event) { ... });

Reference

This event comes with the following event object:

Variable Required Description
event object properties:
sitting boolean true if bot seated on the object, false if it stands
object_uuid the UUID of the object bot is sitting on. NULL_KEY if bot is standing.
position object { x, y, z } - the sitting position (offset)

Example

Bot.on("sit", function(event) { 
  console.log("I'm sitting on the object ", event.object_uuid);
});