How do I make a multiple area trigger ?

0 favourites
  • 4 posts
From the Asset Store
Be quick and choose the right answer for the shown equation.
  • Hi !

    Ive spend some time to found how to make a event where i need to be in multiple area at the same time to trigger it.

    i'm controlling multiples sprites at the same time, and i would want to make all my sprite to go to specific area ( like one on each upper corner for exemple) and the event wouldnt be triggered unless all the corner are occupied by one of my sprite.

    a bit like the classic "two switch on the ground" in games where you need to be on all of them to open the door.

    - i tried using overlapping but i don't know why its not working,

    - i tried colliding but i cant use multiple one on the same event,

    So i tried to use Variable but i can't make it subtrack when im not on the area so i can trigger it by only going multiple time to the same switch in a row.

    Thank you !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess there are a few ways to do this. My approach would be to give all switches a bool variable, lets say its set to false as default. Then have logic 'for each switch if player is overlapping switch, set variable to true, else set false'. Then to determine all are overlapped, pick switch where switch.bool=false, if switch.pickedcount = 0 then all are pressed.

  • ok so i tried a lot a things, and apparently my probleme is not really the one i was thinking.

    i think its more that when i create a new object even if its moving with my character and use the same sprite (its the same object that is being created by an event) its still a different one and not a part of the "principal " character.

    Is there a way to group object, so that everything thats applyied to one is aplly to all of them, and that the event can be triggered bhy any of them ?

  • Possibly using a 'container' may help. If you put multiple objects into a container, you can create the player and then the other objects will be created with it and they also relate to that player when you pick them.

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