Hey there, I'm not sure that this is exactly what you want, but I've been planning for a game that me and my wife had in mind and we needed something similar to what you mentioned.
However I took a different approach, for the sake of calculations instead of trying to specify the exact x,y coordinates of the parent sprite I'm using a more trigonometrical approach, so what I do is, considering that the child sprite (the one that we will move according to the parent one) will have to obey angles and scaling according to the parent I assume that it will move in an imaginary circle inside the parent sprite.
Instead of saying that the child sprite will be in the x,y point of the parent I say that it will be in a circle that is x pixels away (basically the radius) from the center of the parent sprite.
I don't cater for sprites where you changed the default offset but I guess that it could easily be taken into account.
The functions go like this :
function GetScreenXFromSpritePixel(spriteid, spriteAngle, angleOffset, radius, spriteOffset, scaleFactor#)
//thix auxiliary x insures the small square will rotate
//around the center of the big square
AuxX# = GetSpriteX(spriteid) + (GetSpriteWidth(spriteid)/2)
//heres comes the trigonometry bit, we define the points where
//the small square stands as all that belong to a circle
//around the center of the big square with a certain radius
//the radius gets multiplied to the scale factor for obvious reasons
//we add an angle offset in degrees to the current angle of the big square
//because we need to take into account the offset of the
//placement of the initial location of the small square inside
//the big one
trigoX# = (AuxX#) - (Cos(spriteAngle+angleOffset)*(radius*scaleFactor#))
//here we remove, or add if value is negative, a certain offset size of the small square to ensure
//which pixel from the small square gets to belong to the points of the
//imaginary circle, again we take the scale factor into consideration
coordX# = trigoX# - spriteOffset*scaleFactor#
endfunction coordX#
function GetScreenYFromSpritePixel(spriteid, spriteAngle, angleOffset, radius, spriteOffset, scaleFactor#)
AuxY# = GetSpriteY(spriteid) + (GetSpriteHeight(spriteid)/2)
trigoY# = (AuxY#) - (Sin(spriteAngle+angleOffset)*(radius*scaleFactor#))
coordY# = trigoY# - spriteOffset*scaleFactor#
endfunction coordY#
The parameters are this :
spriteid - id of the parent sprite
spriteAngle - current angle of the parent sprite
angleOffset - this is the angle at which the child sprite will be placed, just remember that for AppGameKit 0 degrees is located where 180 degrees would be in an ordinary trigonometrical circle and then it counts clockwise
radius - the distance that the child sprite will be from the center of the parent sprite
spriteOffset - this can be used to adjust the location of the child sprite, you can use it to place the center of the child sprite at the rotation point
scaleFactor# - the scale that was used for the parent sprite in SetSpriteScale
Download the code if you want and try it out, maybe it will help you or at least point you in the right direction.