How to automatically index the numbers for events?

0 favourites
  • 8 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • Hey pals, look at this picture i'm trying to create the events from 0 to 50, but it costs a lot of work, how do you automatize the numbers from 0 to 50?

    <img src="http://i.imgur.com/OMtuyTc.png" border="0" />

    Thanks in advance

  • Out of curiosity, what are you going to be doing in each of those events? Is it something you might be able to use a function for, and therefore use a for loop?

  • I'm making a memory managament to keep reducing the object count each room, this game counts more than 1,000 objects in layout, but i managed to do it, i get less than 50 objects per room in runtime.

    <img src="http://i.imgur.com/w7KwjzI.png" border="0" />

  • Trt this:

    <img src="http://infinitepossibilitygames.com/demos/loop/loop.png" border="0" />

  • theubie thanks for your reponse,

    Also do i create another 2 loops for below that you saw the pic?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Joannesalfa

    Yup. Rinse and repeat as needed. Anytime you've got actions that are the same you can use the for loop to save yourself 49 or so events and avoid Carpel Tunnel Syndrome...for a while at least.

  • theubie Hello, i've updated the codebase for some reason, i'm having a problem with loop, it repeats from 5 to random to multiple actions and doesn't keep event anytime.

    <img src="http://i.imgur.com/q2c4gkH.png" border="0" />

    Otherwise, non-loop events worked after all...

  • Joannesalfa

    One of the quirks with the for loop is that it seems to run all instances in parallel instead of serially. Since I'm unfamiliar with the InstanceBank object, I'm wondering if that's causing issues with it having data thrown at it simultaneously. You might try to add a wait 0.1*loopindex before it so they will all fire off a tenth of a second apart from each other and see if it makes any difference.

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