Random number generate without repeat.

0 favourites
  • 6 posts
From the Asset Store
In this template the music plays without looping in your game
  • 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

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)