What about:
[code]
function GetScale() {
int aHeight = GetGameParameter (GP_SPRITEHEIGHT, GetGameParameter (GP_FRAMEIMAGE, player.View, player.Loop, player.Frame), 0, 0); // Add an amount here ('aHeight = GetGame........... + 5') to have it a scaled amount above his head
float pScale = IntToFloat(player.Scaling)/100.0;
pScale = pScale*IntToFloat(aHeight);
return FloatToInt(pScale);
}
...
object[5].Y = player.y - GetScale(); // Or 'player.y - (GetScale() + 5)' to have it a fixed amount above his head
[/code]
The float is used for accuracy - you could try it with an int, but I'm not sure how it'd turn out. Probably not very well, I think it'd always return the normal, 100%, height or 0.