-----------------------------------------------------------------------
If Collision(#SPRITE, sprite1, sprite3) = True
DisplaySprite(2, 0, 0)
Else
DisplaySprite(3, 0, 0)
EndIf
Code: Select all
@SPRITE 1, "I-PointBlack.png", {Transparency = #WHITE}
Const #Ipoint = 1
@SPRITE 2, "Sword32x20transWhite.png", {Transparency = #WHITE}
Const #Sword = 2
Code: Select all
If Collision(#SPRITE, #Sword, #Ipoint) = True
...do stuff...
EndIf
Well, this is even better, the constants first!fjudde wrote: When I work with sprites I use constants with describing names instead of variables:Code: Select all
@SPRITE 1, "I-PointBlack.png", {Transparency = #WHITE} Const #Ipoint = 1 ...
Code: Select all
Const #Ipoint = 1
@SPRITE #Ipoint, "I-PointBlack.png", {Transparency = #WHITE}