ON COLLIDE keyword

Executes a SUB on a collide event. It is generated when two objects get in contact. When using _OBJECT within the SUB, it references object1.

Syntax

ON COLLIDE object1, object2, sub

Parameters

  • object1: object (required)
  • object2: object (required)
  • sub: subroutine to execute (required)

Example

ON COLLIDE myImage1, myImage2, myFunction

Go back to list of Keywords.