CollisionAnimSprite

Syntax:

x = CollisionAnimSprite( AnimSprite,x1,y1, Sprite,x2,y2 [,collision_mode] )

Parameters:

AnimSprite

=

AnimSprite

x1, y1

=

position of AnimSprite on the screen

Sprite

=

number of your Sprite

x2, y2

=

position of the Sprite on the screen

collision_mode

=

0: exact pixel collision (default)

1: block collision


Return Values:

#false

=

no collision detected

true

=

collision


Description:

This command is used to check for collision

between an AnimSprite and a Sprite.


Example:

  LoadSprite(1,"block",0)

  CatchSprite(2,?Player,0)
  TransparentSpriteColor(2,0,0,0)
  CreateAnimSprite(Player.AnimSprite,2,16,16)

  ; in game loop
  If CollisionAnimSprite(Player,PlayerX,PlayerY,1,100,100)
     ; do something
  Endif


Supported OS:   Windows, Linux