I'm having an issue with an Image sprite colliding with more than one image sprite. Here's the image on top, I've tried two procedures, and I don't know how to fix it. The global touching being 1 and 0 is a true/false statement.
The problem is that HappyImage does not collide with ImageSprite2
Reason for new account is because I have a project due tomorrow lol
See the sprite cannibalism topics too
A While loop in an event will never see changes in global variables that it didn't do.
So the collision variable is useless.
You can use sprite coordinates and sizes to calculate if they overlap.
This project might have code you can use
Is there any way to find collision while not using coordinates? Just asking, it's ok if there is no other way
Yes
You can use the Sprite
CollidedWith(other) Event handler called when two enabled sprites (Ball
s or ImageSprite
s) collide. Note that checking for collisions with a rotated ImageSprite
currently checks against its unrotated position. Therefore, collision checking will be inaccurate for tall narrow or short wide sprites that are rotated.
and for no longer colliding the Sprite the speed (pixels per millisecond) and heading (-180 to 180 degrees) of the fling, as well as the x velocity and y velocity components of the fling’s vector.
NoLongerCollidingWith(other) Event indicating that a pair of sprites are no longer colliding.
as discussed here http://www.appinventor.org/bookChapters/chapter17.pdf