How do I disable collisions with only one copy of instances?

0 favourites
  • 6 posts
From the Asset Store
Footsteps SFX One contains 400 sounds of steps and jumps on different surfaces.
  • I have immovable physical doors on level. All doors are copies of one instance. When door opens, I disable collisions with player, but collisions disabling for all doors, even which are closed. How can I disable collisions with one copy of instance?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just use an instance variable like "is_ignoring_collisions" and don't do anything if it's set to true.

  • What means "don't do anything"? How can I ignore collisions in Physics behavior? I disable collisions for doors with true instance variable in For Each loop, but player doesn't collide with other doors.

  • You need to describe your project more or attach an example.

    How did you set it up? A player sprite with 'platform behavior' and door sprites with ' solid behavior'? You could also create an open door sprite and destroy the closed door at the same position on your "open door action". Open door sprites shouldn't have the solid behavior then.

    I would prefer doing it like Ashley said with instance variables, but don't know if that fits to your project.

  • You can't partially disable the "solid" behavior (i.e. have it act as a solid for select few other objects), however, you can specifically disable said behavior for only one instance. What does your event that disable collision look like ?

  • I use Physics behavior on doors and player. Solved it myself: I compare the nearest door animation and if it is open I disable collisions for all doors, else enable it. But I think there is better way..

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