TActivePlayer.OnFlagReturn

From Soldat Community Wiki
Revision as of 11:15, 30 July 2013 by Mighty (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
property OnFlagReturn
 Access mode: RW
 Event handler type: TOnFlagReturnEvent
 Event handler declaration: procedure(Player: TActivePlayer; Flag: TActiveFlag; Team: Byte)

Description

Event property called when a player returns the flag.

Example

Example increases returning player's score.

procedure OnFlagReturnScore(Player: TActivePlayer; Flag: TActiveFlag; Team: Byte);
begin
  Player.Kills := Player.Kills + 5;
end;

var 
  i: Byte;
begin
  for i:=1 to 32 do
    Players[i].OnFlagReturn := @OnFlagReturnScore;
end.