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

Random Numbers (1-100)

  • Comment actions Permalink
  • Hey

    Thanks for the script. Do you know how i can connect that script to a screen Text?




    Comment actions Permalink
  • Comment actions Permalink
  • but it might also be off track sorry

    Comment actions Permalink
  • Thanks, the script could maybe work. I just dont know how to connect it to a Text xD

    Comment actions Permalink
  • What should the number do with the text?

    Do you want to change the text so that it displays the random number?
    I can offer this script graph :)

    Make a "Input Text" node, that will appear on the script component. Drag your Text Object in there an voilá!

    Comment actions Permalink
  • Ups just read you want to connect scale and font to the number, but can you explain how they should be connected?

    random number = scale ?
    What you want to do with the font?
    More information is needed :D

    Comment actions Permalink
  • Hey Ines Hilz

    Thanks alot for the graph. So my Lens should display random numbers from 1 to 100 and when a certain event happens (e.g. Raise Eyebrows) or after a few seconts, it should stop.

    Scale and Font is only changed once, so i guess that can be done normally within the Text Object.

    Another Feature i was thinking of, is to have two random numbers, going from 1-100(%), but in total it should be 100%.


    So two people can use this lens, one person gets for e.g. 35% and the other should get 65% to get 100% in total. I dont know if this can be done within Lensstudio. If not a number going from 1 to 100 on the screen of the user and stopping after a few seconds, would be fine too.


    Thanks in advance for any kind of help.




    Comment actions Permalink
  • The script graph works fine, but in only displays the generated number. Is it possible to let it run a few seconds? So that it goes through the numbers 1-100 while displaying it on the screen and then stop it after a few seconds.


    The animation should look a bit like this (but with 1-100) and stop after a few seconds on the screen.

    Comment actions Permalink
  • You need to make a new boolean variable called sth like "StopGenerating", that you set to true after the Start node and after a few seconds of Delay.

    Move the script graph i posted from the Start to the Update node, so that it doesn't only run once at the start but every frame. Then you can add an "if" node between the Update and the rest that checks if the  "StopGenerating" bool is true or false.
    The rest of the graph only runs as long as the if statement is false, once the bool "StopGenerating" turns true after the Delay, it stops generating a new Number.

    Long story short:




    Comment actions Permalink
  • To make a second Text display the other percentage of 100, you can make another new Variable called sth like "FirstValue" and save it once the generating stops.

    Then you can do a little math once the bool turned true/the generating stopped: 100 - FirstValue and there you have the second Value :)
    Make a new Input for the second text and set it to this second Value and you are done!
    Please share the finished Lens, i would love to see how it turned out :)

    Comment actions Permalink
  • Hey Ines Hilz

    Thank you very very much for your detailed help! it works thanks! :D



    Comment actions Permalink
  • Glad i could help !
    Looking forward to the lens :)

    Comment actions Permalink
  • Thanks Ines Hilz for the graph! It helped me in another project I am working on too!

    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!