How do I Detect collision with solid objects

0 favourites
  • 5 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hi

    I'm using a solid object as a button to open a door in my game, button is solid and when the player collide with the button a door opens and an effect that I created would happen, however when the player collides with the button, the game detects multiple collisions with the button and creates multiple effects, but I only need one effect to be created when the player collides with the button. I made the button solid so the player can't go through it. Is there a solution to this issue?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If only the effect is a problem you can add another condition to the event trigger once when true and it will only spawn once.

    But this can get complicated for example if you have 3 buttons and 3 doors in a level, you will need to keep instance variable for each button with different value so you will know what button is pressed.

  • If only the effect is a problem you can add another condition to the event trigger once when true and it will only spawn once.

    But this can get complicated for example if you have 3 buttons and 3 doors in a level, you will need to keep instance variable for each button with different value so you will know what button is pressed.

    collision is a trigger itself, trigger once doesn't work with it

  • Oh yeah I forgot about that, well you can limit it with a variable then. Add global variable lets say its called temp set it to 0 on start, and add extra condition on the event temp == 0, then as soon as the trigger fires in the first action set temp to 1, so its only triggered once.

  • Oh yeah I forgot about that, well you can limit it with a variable then. Add global variable lets say its called temp set it to 0 on start, and add extra condition on the event temp == 0, then as soon as the trigger fires in the first action set temp to 1, so its only triggered once.

    Yeah I had this in my but it was conflicting with something else in the game, however I fixed the issue, thanks

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