touchAttachment

From SmartBots Developers Docs
Bot PlaygroundCommands
Revision as of 21:01, 21 December 2016 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Touches an attachment of the bot (HUD or wearable object)</onlyinclude> <syntaxhighlight lang="javascript"> Bot.touchAttachment(...")

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

Touches an attachment of the bot (HUD or wearable object)

Bot.touchAttachment(objectName, linkNumber);

Reference

This command accepts the following parameters:

Variable Required Description


Input:
objectName yes The name of the object to touch.
objectName yes The link number of the prim (root prim = 1)
Output:
result This function does not return anything

Comment

Remember that bot have to load all objects from SL before touching them. So:

  • after logging in, give bot about 30 seconds to load surrounding objects,
  • the same after teleporting.

Determining the link number

The root prim is always 1 (so, linkNumber=1 for 1-prim objects too).

To get the link number of the specific child prim use Phoenix Firestorm viewer:

Get object linknum.jpg
  1. Start editing your object
  2. Check "Edit linked" option
  3. Select required child prim
  4. See the "Link number" value

Examples

Touch a special test attachment object (contact SmartBots support to get it):

// Touch the button of the "Touch tester v2.0" object:
Bot.touchAttachment("Touch tester v2.0", 2);

// Politely exit since we're done
exit();