How to let certain sprites pass through a solid, and some not?

0 favourites
  • 7 posts
From the Asset Store
Who wants to be a Millionaire Clone. An educational coding source
  • I know this is probably very simple but i am very early on in using construct, how do you set collision filters?

  • Hello,

    For each sprite you can unchek the box "Enable collisions" in the objects properties. This will prevent all collisions to be tested on this object, so all your conditions and actions based on a collision/overlap involving this object will also be ignored.

    Checking/Uncheking the box in the objects properties will only affect the initial collision state of this objects when the layout starts. You can Enable/Disable this at any time during your game by using the action "Enable collisions" in the objects action list.

  • Hello, and thankyou for your interest in my question, i think i need to be more specific with my question, basically i have a water object in my game and i would like it so some characters can walk on it but some characters sink in it and i can't figure out how.

  • Try to use the "Set Solid collision filter" action.

    For each different sprite object, you can see a "Tag" property in his properties bar, just under the "Solid" checkbox.

    Lets assume that your water is a sprite with the "solid" box checked. You can write "water" in the "Tag" property.

    If the sprite A needs to collide with your water sprite but not the sprite B, then you have to check the "solid" box for the two sprites. Be sure to use the action "Set Solid collision filter" at the start of the layout on sprite B. You have to choose the option "Exclusive" and write "water" (with the "") in the textbox "Tags".

    You sprite B will ignore all solids with the tag "water".

  • I have done what you said but there isn't the 'exclusive'part which you mentioned, which is odd, again thankyou for your help so far.

  • You used the wrong action in your screenshot, you have to use the "Set Solid collision filter" action, which is in the "Misc" category in the action list instead of the "Solid" category ;).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thankyou so much you're a star!

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