so after you run setspriteoffset(spr_turnip,w,h) would that change the call for setspriteposition or setspritepositionbyoffset?
Is spr_turnip going to be moving while scaling and rotating? If not maybe define the offset before you make changes
scaleandrotate = 1
do
if scaleandrotate = 1
turnipoffsetX = getspritex(spr_turnip) + (getspritewidth(spr_turnip)/2) //this
turnipoffsetY = getspritey(spr_turnip) + (getspritewidth(spr_turnip)/2) //or getspriteybyoffset(spr_turnip)
setspritepositionbyoffset(spr_turnip, turnipoffsetX, turnipoffsetY)
//here is where you do scaling and rotating
//you could put the scaleandrotate=2 here if you needed to unlock sprite movement after scaling and rotating is done
endif
scaleandrotate = 2 //unlocks the sprites movements at a later time in code
sync
loop
I am still a beginner, so I can't say this is the best solution (99% sure its not the easiest way to go) but its the way I would approach it. Hope it helps.
I'd like to see the finished code once you get it figured out!