User Tools

Site Tools


ugbasic:user:kw:hit
Translations of this page:


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

  • Commodore 128 (MOS 8502)
  • Commodore 64

SEE ALSO

HIT

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