COLLIDE keyword

Returns true if two objects are overlapping.

Syntax

COLLIDE (object1, object2)

Parameters

  • object1: object (required)
  • object2: object (required)

Example

DIM touching AS BOOLEAN
touching = COLLIDE(myImage2, myImage2)

IF COLLIDE(myImage, myText) THEN
'...do something
END IF

IF NOT COLLIDE(_OBJECT, myRect) THEN
'...do something
END IF

Go back to list of Keywords.