TI99 Environment

CALL_HIDESPRITE


Syntax

CALL_HIDESPRITE(sprite-number)

Description

The CALL_HIDESPRITE() function hides an existing (active) sprite from the screen display. The sprite retains all its characteristics (size, color, speed, position) and CAN still trigger a sprite to sprite collision. To delete the sprite from memory use the CALL_DELSPRITE() or CALL_DELSPRITEALL() functions.

Valid Values:
sprite-number: accepts an integer between 1-maxsprites.


  Example Code
xsp = 10
spr1 = 1
spr2 = 2
tolerance = 1
call_magnify(2)
call_sprite(spr1,65,5,96,1,0,xsp)
call_sprite(spr2,66,14,96,256,0,-xsp)
coll = 0 
gosub _checkcollision
call_motion(spr1,0,0)      
call_motion(spr2,0,0)          
tiwait(500)
call_sprite(spr1,65,5,96,1,0,xsp)
call_sprite(spr2,66,14,96,256,0,-xsp)
tiwait(2000)
CALL_HIDESPRITE(spr1)
CALL_HIDESPRITE(spr2)
coll = 0
gosub _checkcollision
end
_checkcollision:
   while coll = 0 
     coll = Call_coinc(spr1,spr2,tolerance)
     if coll
        call_motion(spr1,0,0)
        call_motion(spr2,0,0)         
        call_screen(16)
        display_at(1,8,"**Collision**",0)          
        tiwait(1000)        
        call_clear()      
        call_screen(8)        
     endif 
     ti_sync()   
   endwhile
return

Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020