Random + Time Behavior : Something gona wrong

0 favourites
  • 5 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • I test the expression "random(1,20)" in the amount of time of a time behavior, and set to regular, so its loop. When the timer done, a object will respaw.

    The result I ecspected is a gap of like: 1.20, 15, 8.47, etc....

    The result of the test is: the first time that go to the first spaw repeted to all the others like: the first come after 2...all the other come after two. I do a F5: the first was 8 seconds, all the other goes after 8 seconds. I repeated this some times and the result is constant.

    So I would to know, what I done wrong or if theres something wrong.

    (I imagine is because the regular box, that loop the timer, but I guess it'll lopp with the function of random too) Theres a way to do that?

    Thank you verymuch if you could help.


  • Set the timer to random(1,20) as Once, then have On timer finished, set timer to random(1,20) Once

  • Thank you

    I had thought that this could be the problem but I really hoped it could work differently, because what happens is that I had configured many actions with the "system- for every x second" and now I am studying the best way to do this transition. I saw several posts talking about this case and the recommendation is the timer or set up to use the dt to make a proper timer, but from what I've studied so far I haven't seen a way that works for my case, yet. The problem is that I have a lot o spaw actions, with diferente amount of times working in random, and together. I would have to configure many different timers, and also double the number of actions to be able to reset them ... and I want to do this with precision to not change the fluency of respaw I make and tested to make the game works properly.

    I realy acept sugestions

  • So what is the specific problem you are having? Each instance would have its own timer so you can track this if you want per instance. If the actions are so different you can use tags to separate them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you so much

    I needed to understand better how the thinks will work, now I understand.

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