Table of Contents

ugBASIC User Manual

HIT

SYNTAX

   = HIT(#sprite)
   = HIT(var)

PURPOSE

Verify if a sprite has had a collision with a tile. The result (0 = no collision, <> 0 = collision occurred) is returned as result.

Alias for COLLISION.

EXAMPLE

  IF HIT( starship ) THEN
     POINT AT (100,100)
  ENDIF

AVAILABLE ON

ALIAS FOR

COLLISION

ANY PROBLEM?

If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!

POWERED BY