How do you make a random event?( capx needed )

0 favourites
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • depends how random u want it to be ... if u want a random event to happen to switch position random is not something u may want since everything u have is a round number try using choose instead and a list of numbers that u set for each "random" action u want to do so for example u got the random string number that u want the engine to choose from like this choose(1,2,3,4,5,6,7,8,9,10)

    then add a condition for each number what to happen if number =1 = trigger animation right

    and so on its actually pretty easy to understand ... however using random(1,2) it wont do it right ... since random takes any number +-0.00001 and so on so the result will be somewhere between 1 and 2 that means it can also be 1.5 or 1.1 or smth else and if u need a full round number... the system expression random is not something to use unless u really need it ... choose is also similar to random just its more clean.. which i think is even better then random.. takes away some problems ... unless u got a huge list of numbers u want then u use floor(random(1,100000000)) or what ever to get a random number between 1, and 100 mil and floor cuts the 0.001 sub-digits... but i think in this case for ur use best choice is to use the expression choose(n,n) replace n n with any number u want

    a poor representation capx Download

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)