(solved)How I invert event"on collision with another object"

  • https://www.dropbox.com/s/6t04ei6ng6c6y ... t.jpg?dl=0

    I need to have an action that works only if my character is NOT colliding with specific object, but it seems that it cannot be done, because "invert" is grayed out in that event.

  • You can only invert "is overlapping" in that case - maybe you can make use of that.

    If you wanna work around it (* = one event):

    *every tick: set colliding = 0

    *on collision: set colliding = 1

    *colliding = 0: do stuff

    since events are read from top to bottom, this should work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for letting me to know about that, but in my case it seems that it won't work, because it must disable the physics force to keep the player pushed against wall (this bug allows player to "fly" if he jumps and runs to wall, and its not what i want).

    When i tried this method, sometimes it would somehow bounce from the wall and disable that arrow key so player is not able to walk anymore at all to that direction. So i think i need to figure out some other method.

    I wonder if there is some technical reason why i cannot invert that specific event?

  • A triggered event can not be inverted.

    If you could explain more clearly what you are trying to accomplish, we might be able to explain how to do that..

  • Okay, ill try:

    I have player that walks with physics forces. If you press left, player has physics force to left. And if you press up, you get physics force to up etc. Now i have some immovable walls. If player jumps against the wall, he could "fly" by pushing himself against to that wall. And if he fast press up key, he actually could climb the wall that should not be climbed.

  • Would it be good way to fix this by doing some invisible "overlapping object" next the walls? Because overlapping is one that can be inverted?

  • Yes, that overlabbing object fixed this problem. Thanks all!

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