Random number generate without repeat.

From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • My problem is very simple:

    How do I create a random number between two value one time.

    (Not repeat again n again... only once generate random number!)

    So if I wrote that:

    System - Set value: Set Glo_temp_vari to floor(random(3,13))

    It will to generate a number between 3 and 13, but after it will to repeat again and again to infinitium. I want that it doesn't repeat again.

    Something simple solution? Thx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • My problem is very simple:

    How do I create a random number between two value one time.

    (Not repeat again n again... only once generate random number!)

    So if I wrote that:

    System - Set value: Set Glo_temp_vari to floor(random(3,13))

    It will to generate a number between 3 and 13, but after it will to repeat again and again to infinitium. I want that it doesn't repeat again.

    Something simple solution? Thx

    Maybe a 'trigger once while true' (a system condition)

  • If you search on your own topic name you will find multiple answers.

  • Thanks Aphrodite!

    It's work.

  • Sorry, misread the question. If you just need something done once per layout, you use:

    System:On start of layout.

    You put all of your startup code in there, rather than adding 'Trigger once' to all of your conditions.

  • No problem! Thx, it's also good idea.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)