Doors and collisions

This forum is currently in read-only mode.
From the Asset Store
The package contains 105 sounds This sound library is perfect for voicing mechanical doors in your Sci-Fi game.
  • Hi, got a bit of a problem in my game.

    I have door sprites. And I have keys.

    What I want is to remove (Destroy) the doors if the player have one, or more, keys and collides with the doors.

    Things isn't working as expected. :/

    Events:

    On collision between Player and Door

    (sub event) Player Value 'keys' Greater or equal 1

    Actions for the sub event:

    Player: Subtract 1 from 'keys'

    Door: Destroy

    But the thing is, no matter how many keys the player have, the collision between the player and the door doesn't run the actions.

    I ran the debugger and saw that the player do have a key, so the sub event should fire, but it's like if the collision event isn't firing.

    Just to try things out, I moved the Door: Destroy action to the On collision event, but it still refused to disappear.

    How can this be fixed?

    Thanks for any help.

  • Tried it out here and everything worked fine - keycount got reduced, door destroyed. So... I have no idea. Check your objects' collision settings?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you have a .cap which isn't working like you expect it, send it over to ashley@scirra.com and I'll take a peek.

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