AMOSi:Bob Sprite Col

From Amiga Coding
Jump to: navigation, search

an example can be found on AMOSPro_Tutorial:Tutorials/Collision_Detection.AMOS

Tests a single BOB for a collision with a group of sprites. A value of -1 signifies that the test was successful. You can now immediately check for the other objects involved in the collision using the COL function.

c=Bob Sprite Col(bobnumber)

Note that ALL the sprites you are testing MUST have a blitter mask. These are created using the MAKE MASK command.

You can also use a second version of this function.

c=Bob Sprite Col(bobnumber,first TO last)

Tests for collisions between the source Bob and Sprites from first to last.