Difference between revisions of "TMap.OnAfterMapChange"
(new page) |
Savage0795 (talk | contribs) m |
||
Line 2: | Line 2: | ||
Access mode: RW | Access mode: RW | ||
Event handler type: [[TOnAfterMapChangeEvent]] | Event handler type: [[TOnAfterMapChangeEvent]] | ||
− | Event handler declaration: procedure ( | + | Event handler declaration: procedure (NewMap: string); |
==Description== | ==Description== | ||
− | Event property called after the | + | Event property called after the ''NewMap'' is loaded, which means all {{link|TMap|Objects}} and {{link|TMap|Spawns}} are already there for the ''NewMap''. {{test|in-depth}} |
==Example== | ==Example== | ||
<syntaxhighlight lang="pascal"> | <syntaxhighlight lang="pascal"> | ||
− | procedure OnAfter( | + | procedure OnAfter(NewMap: string); |
begin | begin | ||
− | WriteLn('Map loaded: '+ | + | WriteLn('Map loaded: '+NewMap); |
end; | end; | ||
Latest revision as of 23:46, 19 September 2018
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;