overlaps With
Check if this sprite is overlapping another sprite.
An overlap of two sprites is dectected when the first non-transparent pixel in the image of the first sprite overlaps the first non-transparent pixel of the second sprite. If a sprite has it’s ghost
flag set, any overlap with another sprite won’t be noticed. Also, an overlap occurs even when the values of Z for the sprites are different.
Parameters
- other: the other sprite to check for overlap with this sprite.
Returns
- a boolean value which is
true
if the other sprite is overlapping this sprite.
Example
Send a blue square toward a red square. While the red square is overlapping the blue square, randomly change the color of the “red” square to something else.
See also
on overlap