Hello guys,
I have just bought AppGameKit and immediately start play like a kid
. But I'm now confronted with strange problem (strange just for me of course
).
I'm trying to delete sprite after collision. But I'm making some mistake and can't figure out what
.
So here is a code:
SetVirtualResolution ( 320, 480 )
LoadImage ( 1, "background.jpg" )
CreateSprite ( 1, 1 )
LoadImage ( 2, "strazar.png" )
CreateSprite ( 2, 2 )
LoadImage ( 3, "vatreni.png" )
CreateSprite ( 3, 3 )
SetSpritePosition ( 2, 0, 200 )
SetSpritePosition ( 3, 200, 200 )
SetSpriteShape ( 2, 2 )
SetSpriteShape ( 3, 2 )
rem A Wizard Did It!
do
SetSpritePosition ( 2, GetSpriteX ( 2 ) + 1, 200 )
if GetSpriteCollision ( 2, 3 ) = 1
DeleteSprite(3)
endif
Sync()
loop
Could someone be so kind to give me few directions?
Regards.
@djeronimo.com