Does C2 remember instances in sub-events?

0 favourites
  • 4 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • For example, in something like this:

    Enemy var = 1

    ---- Enemy X > 500

    ---- >> Do this

    ---- Enemy X < 500

    ---- >> Do that

    ... will it remember the instances of Enemy it picked in that first event? In my project, I'm beginning to suspect it doesn't. If someone could clear that up I'll know if I'm looking in the wrong place to fix this issue or not.

  • try

    foreach Enemy

    Enemy var = 1

    --- etc

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, this is an important part of how sub-events work. From your example:

    Enemy var = 1 - all enemies with var = 1 are picked

    ---- Enemy X > 500 - of these it's further filtered down

    ---- >> Do this

    For the next subevent it returns to all enemies with var = 1 picked

    ---- Enemy X < 500 - of these it's further filtered down again

    ---- >> Do that

  • I'll see how the For Each Enemy thing works out, but in my project... well, it doesn't seem to be working out. It has a lot of subevents in this one section, but it didn't seem to be remembering the instances it picked in the first event. If I added in the same condition from the first event ("Enemy var = 1") into each subevent, it started working correctly, with no other changes.

    I'd rather not post the capx since this is one I might finish and actually do something with. Again, I'll try the For Each Enemy and report back later. Thanks for the responses.

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