User Tools

Site Tools


ugbasic:user:hit
Translations of this page:


ugBASIC User Manual

HIT

SYNTAX

  • = HIT( # [integer] )
  • = HIT([expression])

PURPOSE

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

EXAMPLE

 IF HIT( #1 ) THEN POINT AT (100,100): ENDIF
 IF HIT(startship) THEN HALT: ENDIF

AVAILABLE ON

  • Commodore 64

SEE ALSO