The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

Calling Boolean Variable

  • try 

    	print("On! " + obj);
    Comment actions Permalink
  • Hi n-mikael, thank you for your reply but it does not work logically

    Comment actions Permalink
  • I'm not entirely sure on your goals here and if this would suit, however my suggestion would be to take the bool values in as an array instead of one by one, i.e.

    //@input bool[] aTweens

    // looping through tweens

    for(var i = 0; i < script.aTweens.length; i++){
    var tmpTween = script.aTweens[i]
    //tween logic

    This way, if you just remove a tween from the array, logic for this tween won't even run

    Comment actions Permalink
  • Thank you Jye for the response, that definitely will work but the scope of I wanted to achieve is this:


    is there a way to call script.(name) using a string? ( for the first round of forloop script.Tween1 then next loop, script.Tween2 then last loop script.Tween3)

    I just want to simplify my code using loop statement rather than typing everything one by one. in this way I can make my workflow hassle free.

    Comment actions Permalink
  • Ah I think I see what you're trying to do. In Javascript there are two ways of calling/setting properties of an object.


    In your case, instead of using:

    script.Tween = "......."

    within the loop, to get access to your tween variables, you can use:

    var tweenBool = script["Tween" + num]
    var tweenName = script["TweenName" + num]
    var tweenAction = script["TweenAction" + num]

    Hope This helps! 

    Comment actions Permalink
  • Wow Jye, It works!! Thank you so much dude!!

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?



Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:



What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!