It can be useful to find objects, avatars and hotspots so you can perform actions on them. See Scenario Actions for what you can do once you have found an item.
Finding an Object
By name
var breathalizer = LB.Utils.findItem("breathalizer"); |
Finding an Avatar
By ChatMapper actor ID
var cop = LB.avatarController.findAvatar({cmID:2}); |
By name
var avatar = LB.avatarController.findAvatar({name:"Actor2"}); |
By externalId
var avatar = LB.avatarController.findAvatar({externalId:"57a9b36132633"}); |
Finding a Hotspot
By spotTag
Example: This will find the hotspot with the parameter spotTag = “player_init”.
var hotspot = LB.navigationController.findMarkersByTag("player_init") |
This is the default mode of the function. You can also get all the spots with that spotTag, or a random one.
Syntax
findMarkersByTag(spotTag, mode) |
Parameters
spotTag | (required) string identifying the item |
mode | (optional) You can find using 3 modes, first, random or all matches. LB.navigationController.findModes.RANDOM: Returns a random one within the matches LB.navigationController.findModes.ARRAY: Returns all the matches |
© 2018 LearnBrite – Commercial In Confidence
Trademarks & Copyrights are property of their respective owners. Pictures are indicative only & may not reflect final production.