Thanks Huehnerschaender!!
I've compiled your code but the message appears when it should but it doesn't go away?? Am I doing something wrong?
Code:
procedure TFormGame.BonusLife;
begin
with BonusMsg do
begin
Text := 'Bonus life!';
NeededPoints := 25000;
StartTime := 0;
Duration:= 5000;
end;
if (points >= BonusMsg.NeededPoints) then
begin
with BonusMsg do
begin
StartTime := GetTickCount;
inc(NeededPoints, 25000);
end;
end;
if GetTickCount - BonusMsg.StartTime < BonusMsg.Duration then
dxFontBonus.TextOut(dxDrawGame.Surface,300,330,BonusMsg.Text);
end;
procedure bonus life is called in my playing statemachine.
Bookmarks