Difference between revisions of "AMOSi:Sprite Col"

From Amiga Coding
Jump to: navigation, search
m (1 revision(s))
 
(Extracted from the AMOSPro V2.00 helpfile)
(No difference)

Revision as of 02:45, 17 November 2007

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


Looks for collisions between several sprites. These sprites MUST have been previously initialised with the MAKE MASK option.


c=Sprite Col(source)

If another sprite has collided with your source object, you'll get a value of -1. Otherwise the result will be zero.


There's also a more selective version of this function.


c=Sprite Col(source,first TO last)

Only checks for collisions between the source object and sprites from first to last. (See COL,MAKE MASK)