TActivePlayer.OnFlagReturn

From Soldat Community Wiki
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.