TMap.OnAfterMapChange

From Soldat Community Wiki
Jump to: navigation, search
property OnAfterMapChange
 Access mode: RW
 Event handler type: TOnAfterMapChangeEvent
 Event handler declaration: procedure (NewMap: string);

Description

Event property called after the NewMap is loaded, which means all Objects and Spawns are already there for the NewMap.

Needs testing (in-depth)

Example

 procedure OnAfter(NewMap: string);
 begin
   WriteLn('Map loaded: '+NewMap);
 end;

 // ...

 begin
   // assign OnJoin handler
   Map.OnAfterMapChange := @OnAfter;

   // ...

   // unassign
   Map.OnAfterMapChange := nil;
 end;