TMap.OnBeforeMapChange

From Soldat Community Wiki
Revision as of 22:00, 25 August 2013 by Mighty (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
property OnBeforeMapChange
 Access mode: RW
 Event handler type: TOnBeforeMapChangeEvent
 Event handler declaration: procedure (Next: string);

Description

Event property called after the map is loaded, which means all Objects and Spawns are not yet there for the Next map.

Needs testing (in-depth, can we still change previous map spawns for example?)

Example

 procedure OnBefore(Next: string);
 begin
   WriteLn('Map loading: '+Next);
 end;

 // ...

 begin
   // assign OnJoin handler
   Map.OnBeforeMapChange := @OnBefore;

   // ...

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