Ignore Sprites with solid behavior

0 favourites
  • 8 posts
From the Asset Store
A set of 10 pixel art animated magic effects with icons. 2 Fire, 2 Earth, 2 Wind, 2 Water, Portal, Explosion.
  • Hello, everybody.

    I have a character with the behavior "8-directions" and another Sprite with "solid" behavior.

    How do I ignore my character that object, that is going through it normally?

  • derikvlog, why would you have solid behavior on the object if you did not want solid behavior?

    You can turn it off dynamically, but it sounds like you need more than one sprite. Ones that you can move through (no solid behavior) and ones you can't (solid behavior).

    If you really do want to ignore solid behavior temporarily you can alter the state, on the collision or some other event.

    Solid actions

    Set enabled

    Enable or disable Solid for this object. Be careful not to trap objects by enabling the solid when an object is overlapping it; see Avoid crushing/trapping objects with Solids.

    https://www.scirra.com/manual/104/solid

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • derikvlog, why would you have solid behavior on the object if you did not want solid behavior?

    He could want the solids to only affect certain objects, not all of them.

  • derikvlog u can disable the collision with that object .. with physics i think

  • derikvlog, why would you have solid behavior on the object if you did not want solid behavior?

    You can turn it off dynamically, but it sounds like you need more than one sprite. Ones that you can move through (no solid behavior) and ones you can't (solid behavior).

    If you really do want to ignore solid behavior temporarily you can alter the state, on the collision or some other event.

    Solid actions

    Set enabled

    Enable or disable Solid for this object. Be careful not to trap objects by enabling the solid when an object is overlapping it; see Avoid crushing/trapping objects with Solids.

    https://www.scirra.com/manual/104/solid

    Man, this behavior I know use. The problem is ...

    I'm making a game where the enemies are walking from one side to another, within a "fence". Play more need to go through that fence.

    PS: I want only the enemies collide with the fence (solid behavior), the PLAY pass by it normal.

  • Hasuak, right. Still yet it would probably be better to not have a solid at all, then have the Enemies' behavior change when overlapping. turn around, stop, etc.

    This is a problem where you have to decide if it is the sprite's behavior you are wanting to change dynamically, or the behavior of the objects interacting with the sprite. Rather than have the sprite try to accommodate all actions of external objects, have the external objects handle how they interact with the block.

  • You could give the enemies another object on top of them and make it a physics object. Use Pin behavior to stick the object on top of the enemy. Then make the fence also an immovable physics object. Physics objects don't collide with objects with Solid behavior so you can keep using Solid for player without a problem of colliding with either the fence or the enemies.

  • You could give the enemies another object on top of them and make it a physics object. Use Pin behavior to stick the object on top of the enemy. Then make the fence also an immovable physics object. Physics objects don't collide with objects with Solid behavior so you can keep using Solid for player without a problem of colliding with either the fence or the enemies.

    I recorded a video showing what happens, I tried to do it the way you told me ... more did not work, what I did wrong with the physical?

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