@BN2
A reminder:
Whenever you create a bitmap, the programs focus is set to that bitmap until you use SET CURRENT BITMAP <to whatever - usually 0>
Also, whenever you use GET IMAGE, you have to call a sync after it or it may not register as being captured.
The same with PASTE SPRITE - you
may need a sync after calling it depending on the timing of the update.
DBC
set display mode 640,480,32
sync on
sync rate 0
rem make a white square as a barrier
cls rgb(255,255,255)
get image 1,0,0,200,200
sync
rem make a sprite from it
rem place the barrier at the bottom as a sprite
sprite 1,200,screen height()-201,1
`hide sprite 1
rem make a black square with which to show damage
cls 0
get image 2,0,0,20,20
sync
rem create an offscreen bitmap just for testing purposes
create bitmap 14,500,500
do
rem paste the sprite image on the off screen bitmap
set current bitmap 14
paste sprite 1,0,0
rem claculate some random damage
x=rnd(200)
y=rnd(200)
paste image 2,x,y
rem grab the sprite image of the damaged barrier
get image 1,0,0,200,200
sync
rem either use SPRITE to make the sprite appear on bitmap 0
rem or switch the screen and paste it
sprite 1,200,screen height()-201,1
loop
Enjoy your day.