SpriteX(#Sprite) & SpriteY(#Sprite)
Posted: Wed Mar 23, 2005 11:31 pm
Code: Select all
SpriteX(#Sprite) ;Get the current X-Position of the Sprite
SpriteY(#Sprite) ;Get the current Y-Position of the Sprite
c ya,
nco2k
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
SpriteX(#Sprite) ;Get the current X-Position of the Sprite
SpriteY(#Sprite) ;Get the current Y-Position of the Sprite
i dont know how it should make sence! you create or load a sprite and can get its width and height! then you can move the sprite with variables like x and y! so YOU move the sprite and so you KNOW the position of the sprite!nco2k wrote:this might be useful. fred what do you think?Code: Select all
SpriteX(#Sprite) ;Get the current X-Position of the Sprite SpriteY(#Sprite) ;Get the current Y-Position of the Sprite
c ya,
nco2k
Code: Select all
Procedure SpiteHandling(spritenumber,xpos,ypos,SpriteMode)
If SpriteMode(spritenumber)=1
DisplaySprite (SpriteFigure(spritenumber),SpriteX(spritenumber),SpriteY(spritenumber))
else
DisplaySprite (SpriteFigure(spritenumber),SpriteX(spritenumber),SpriteY(spritenumber))
endif
endprocedure