Hi!
Small problem:
I have outcommented the Label1.Caption because when there is no collision between mousescene and player the caption should be empty. But it remains empty when in the next line there is collision between mousescene and NPC.
So how can I get a blank caption only when there is no collision at all?
if PlayerMouse.Scene.BoundingBox.RectangleXY.Collides(StatePlay.PlayerScene.BoundingBox.RectangleXY.Grow(-30, -20)) then Label1.Caption := Player.Personalia.FirstName; // else Label1.Caption := ' ';
for I := 1 to Location.NPCNR do
begin
if PlayerMouse.Scene.BoundingBox.RectangleXY.Collides(StatePlay.NPCScene[I].BoundingBox.RectangleXY.Grow(-30, -20)) then Label1.Caption := NPC[I].Personalia.FirstName; // else Label1.Caption := ' ';
end;