Say I wanted to change the opacity of a sprite (or whatever) for the duration that it was colliding with another sprite? I get that I can used the "On collision with" condition, but I don't see a "while colliding with" or "when collision ends" condition. I'm sure I'm missing some basic theory here.
What about 'Is Overlapping'?
"Is overlapping" doesn't seem to do anything. Do collision volumes overlap? Isn't the point of collision to keep them from overlapping?
Develop games in your browser. Powerful, performant & highly capable.
Very simplified version of what I'm seeing: capx
when collision ends" condition:
add Event / overlapping / set opacity to ~~.
then right click the event / click on Invert .
is that what you are looking for ?
<img src="https://dl.dropboxusercontent.com/u/139486255/Image/sample1.jpg" border="0" />
when an event is inverted you will see the red X in the event,
so that event means, when spy is not overlapping sunny, then set opacity to 100
Ah, I didn't realize that "is not Is Overlapping" would trigger an event! And it doesn't need to be done on every tick?
Also, I fixed the sharing on that capx, so it should be downloadable now.
moiremusic It does not. All events that are not triggers (the green arrow) are checked every tick, so adding the every tick condition is meaningless. ^^
I just don't get it. I can't get this to work. Can someone check this? capx
The player never overlaps the NPCs because they are solid. But a collision is a one off event so there's no such thing as 'while colliding'. You can however use 'overlapping at offset' to check if the player is (not) near an NPC.
So each of these events is checking at a different point outside the player's collision volume for an overlap?
I downloaded your capx, deleted the solid behaviours and it seems to work fine.