JackieChan's Forum Posts

  • Thanks I switched to your method and that worked, but in another layout of my game If a sprite with a powerup overlaps another sprite with a powerup, only the first sprite's size is changed to 50,50. not both.

    How do I make this?

  • Thanks that does fix this problem, but I have another issue.

    In another layout of my game If a sprite with a powerup overlaps another sprite with a powerup, only the first sprite's size is changed to 50,50. not both.

    How would I do this?

  • This still doesn't work. You changed all the sprites sizes to 64,64 but I need them to all be different like in the cap in my first post.

    Does anybody know a fix for this?

  • Thanks but I just tried that and it still doesn't work.

    Link: http://www.mediafire.com/download/jmei3 ... ables.capx

    Does anybody know a good way to pick between two objects of the same type when they're overlapping and compare their variables?

  • Edit: blackhornet fixed the old problem below but now I have a new problem. In another layout of my game If a sprite with a powerup overlaps another sprite with a powerup, only the first sprite's size is changed to 50,50. not both. How would I do this?

    Old Problem: In my game if a sprite with a powerup overlaps another sprite without a powerup, the sprite without a powerup has his size changed to 16,16.

    If a sprite with a powerup overlaps another sprite with a powerup, both their sizes are changed to 50,50.

    I got the second part working, but the problem is when a sprite with a powerup, overlaps a sprite without a powerup the first sprite changes size but it should stay the same.

    How do I fix this?

    Here's the link to my cap: http://www.mediafire.com/download/ron6o ... ables.capx

  • Yeah you can use my link. I don't mind.

  • Thanks for this! It works well!

    I finished your tutorial and I got 5 errors when I tested it, but I fixed them.

    The errors were that I had to change all the

    cr.behaviors.Platform.prototype

    to

    cr.behaviors.MyPlatformerModified.prototype

    Here is the completed behavior for anyone that doesn't want to change the code. I also changed the author and help url in the edittime.js file.

    Link: http://www.mediafire.com/download/q5y7l ... dified.zip

    And here's an example cap of the behavior working

    Link: http://www.mediafire.com/download/r9c2l ... tform.capx

  • Thanks R0J0hound and Ruskul!

    I added your solutions to the list. They work great!

  • The enemies only follow the player when he gets near them. If I made the enemies change direction when they hit the wall, then they wouldn't follow the player if he's close to a wall.

    megatronx's solution works though because I can make them stop instead of change direction.

  • Actually megatronx is right and saiyadjin's solution won't work.

    I had a problem in my game where I was using the platform behavior and I needed the player to move through a certain wall, but the enemies couldn't move through that wall.

    Disabling solids would make the player and enemies fall through the floor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ???

    Only the physics object has a "Enable/disable collisions" action, all other behaviors don't have that action.

    Also the physics object doesn't use the solid behavior to handle collisions.

  • No because I couldn't figure out how to do this in construct 2, but eventually I found some solutions to this issue and I listed them here:

  • I made a list of workarounds to this issue here:

  • I made a list of workarounds to this issue here:

  • In Construct 1 the platform behavior had an action that allowed you to select any solids that you wanted to ignore collisions with, but this feature is not in Construct 2 at the moment.

    It would be great to have a "ignore collision with selected solid" feature in construct 2 that would work with all behaviors, but until then these are the workarounds you can use to achieve that same effect.

    1. Use Paco's Extended Platform behavior

    Link: behaviour-paco-039-s-extended-platform_t80887

    2. Use the default Physics behavior to create your own movement, then use the "Enable/disable collisions" action to choose which solids to ignore.

    3. Make your own movement using R0J0hound's Chipmunk Physics behavior, then use the collision filtering feature to ignore selected solids.

    Link: behavior-chipmunk-physics_t110815

    4. Make your own movement using the custom movement behavior or without using behaviors at all.

    5. Make your own "stop movement" or "push out" system that could push the objects out of selected solids when overlapping them.

    6. Use R0J0hound's collision filtering example that was made using events.

    Link: https://www.dropbox.com/s/i1vr8srq201gw ... .capx?dl=1

    7. Use ruskul's modified platform behavior.

    Link to thread: ignoring-specific-solids-using-the-platform-behavior_t167299

    Link to behavior: http://www.mediafire.com/download/q5y7l ... dified.zip

    Link to example cap: http://www.mediafire.com/download/r9c2l ... tform.capx

    If you know any other workarounds, please tell me so I can add them to this list.