Quote: "Sorry for double posting but my account is still in the newbie stage (I dont know what to call it :\)."
It's a "Newbie Slap".
Normally the upper left of the sprite is where the sprite is placed but if you used OFFSET SPRITE... whatever the offset you assign to the sprite is the new center. If you intend to use ROTATE SPRITE you should offset the sprite to it's center so it rotates around it's center.
` Make a box
ink rgb(0,255,0),0
box 0,0,50,50
ink rgb(255,0,0),0
box 0,25,50,50
get image 1,0,0,50,50,1
do
` Show the sprite at the mouse coordinates
sprite 1,mousex(),mousey(),1
` Check for the spacebar
if keystate(57)
` Center the sprite
offset sprite 1,25,25
else
` Return sprite to normal offset
offset sprite 1,0,0
endif
` Increase the angle
inc Angle
` Rotate the sprite
rotate sprite 1,wrapvalue(Angle)
loop
The above code snip creates a box and rotates the sprite. When you want to center the sprite with OFFSET SPRITE hold down the spacebar and let go of the spacebar to return to the normal offset. Normally you only want to use OFFSET SPRITE once and not constantly like this does... I mean the offsetting back to 0,0 when not hitting the spacebar... it's just a quick example.