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

Get help using Construct 2

Post » Fri Apr 24, 2015 7:24 pm

Image

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.
Last edited by sorbias on Sat Apr 25, 2015 8:03 am, edited 1 time in total.
B
11
S
1
Posts: 63
Reputation: 658

Post » Fri Apr 24, 2015 7:51 pm

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.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sat Apr 25, 2015 7:08 am

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?
Last edited by sorbias on Sat Apr 25, 2015 7:30 am, edited 1 time in total.
B
11
S
1
Posts: 63
Reputation: 658

Post » Sat Apr 25, 2015 7:30 am

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Apr 25, 2015 7:37 am

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.
Last edited by sorbias on Sat Apr 25, 2015 8:02 am, edited 1 time in total.
B
11
S
1
Posts: 63
Reputation: 658

Post » Sat Apr 25, 2015 7:46 am

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?
B
11
S
1
Posts: 63
Reputation: 658

Post » Sat Apr 25, 2015 8:02 am

Yes, that overlabbing object fixed this problem. Thanks all! :)
B
11
S
1
Posts: 63
Reputation: 658


Return to How do I....?

Who is online

Users browsing this forum: danalog, dop2000 and 22 guests