Thanks jezza for telling me that function.
It's a bit better now. But I need it to appear above the object, not below.
int PickedObject = dbPickObject(dbMouseX(), dbMouseY(), Enemy::GetLowIndexRange(), Enemy::GetHighIndexRange());
if(PickedObject)
{
dbText(dbObjectScreenX(PickedObject), dbObjectScreenY(PickedObject) - dbObjectSizeY(PickedObject, 1), "Zombie");
}
Is it possible to calculate the height of the object as shown in the screen (not actual height) as the replacement for dbObjectSizeY(PickedObject)? or is there any built-in function to do so?
Because I have camera zoom feature (and movable character) in this game. So it can't be done just by deducting the text's Y position using a fixed number.
Thanks.