HintsComponent
Lens Studio v1.5.0+
Scripting Name: Component.HintsComponent
Inherits from Component
Description
Used to show and hide hints to the user. For more information and useful helper scripts, see the Scripting Hints Guide.
Hint ID | Hint Message |
---|---|
“lens_hint_blow_a_kiss” | “Blow A Kiss” |
“lens_hint_come_closer” | “Come Closer” |
“lens_hint_do_not_smile” | “Do Not Smile” |
“lens_hint_do_not_try_with_a_friend” | “Do Not Try With A Friend” |
“lens_hint_find_face” | “Find Face” |
“lens_hint_keep_raising_your_eyebrows” | “Keep Raising Your Eyebrows” |
“lens_hint_kiss” | “Kiss” |
“lens_hint_kiss_again” | “Kiss Again” |
“lens_hint_look_around” | “Look Around” |
“lens_hint_look_down” | “Look Down” |
“lens_hint_look_left” | “Look Left” |
“lens_hint_look_right” | “Look Right” |
“lens_hint_look_up” | “Look Up” |
“lens_hint_make_some_noise” | “Make Some Noise!” |
“lens_hint_nod_your_head” | “Nod Your Head” |
“lens_hint_now_kiss” | “Now Kiss” |
“lens_hint_now_open_your_mouth” | “Now Open Your Mouth” |
“lens_hint_now_raise_your_eyebrows” | “Now Raise Your Eyebrows” |
“lens_hint_now_smile” | “Now Smile” |
“lens_hint_open_your_mouth” | “Open Your Mouth” |
“lens_hint_open_your_mouth_again” | “Open Your Mouth Again” |
“lens_hint_raise_eyebrows_or_open_mouth” | “Raise Your Eyebrows / Or / Open Your Mouth” |
“lens_hint_raise_your_eyebrows” | “Raise Your Eyebrows” |
“lens_hint_raise_your_eyebrows_again” | “Raise Your Eyebrows Again” |
“lens_hint_smile” | “Smile” |
“lens_hint_smile_again” | “Smile Again” |
“lens_hint_swap_camera” | “Swap Camera” |
“lens_hint_tap” | “Tap!” |
“lens_hint_tap_a_surface” | “Tap A Surface” |
“lens_hint_tap_ground” | “Tap The Ground” |
“lens_hint_tap_ground_to_place” | “Tap Ground To Place” |
“lens_hint_tap_surface_to_place” | “Tap Surface To Place” |
“lens_hint_try_friend” | “Try It With A Friend” |
“lens_hint_try_rear_camera” | “Try It With Your Rear Camera” |
“lens_hint_turn_around” | “Turn Around” |
“lens_hint_walk_through_the_door” | “Walk Through The Door” |
Methods
hideHint(String hintID)
: Boolean
Hides the hint with id hintID
.
showHint(String hintID, Number time)
: Boolean
Shows the hint with id hintID
for a duration of duration
seconds. Use a duration of -1 to keep the hint onscreen forever.
Inherited Methods
destroy()
: void
Destroys the component.
getSceneObject()
: SceneObject
Returns the SceneObject the component is attached to.
getTransform()
: Transform
Returns the Transform this component is attached to.
isSame(SerializableWithUID other)
: Boolean
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
getTypeName()
: String
Returns the name of this object’s type.
isOfType(String type)
: Boolean
Returns true if the object matches or derives from the passed in type.
Inherited Properties
enabled
: Boolean
If disabled, the Component will stop enacting its behavior.
Examples
// Create the hints component
var hintsComponent = script.getSceneObject().createComponent("Component.HintsComponent");
// Show "Smile" hint
hintsComponent.showHint("lens_hint_smile", -1);
// Wait for smile...
script.createEvent("SmileStartedEvent").bind(function()
{
// Hide the "Smile" hint
hintsComponent.hideHint("lens_hint_smile");
});
Still Looking for help?
Visit Support