Jump to content

GetMapRotationInfo: Difference between revisions

Add example
No edit summary
Tag: Source edit
(Add example)
Tag: Source edit
 
Line 24: Line 24:


== Examples ==
== Examples ==
{{noexamples}}
<syntaxhighlight lang="c" line="1">
// This script prints the indices and names of the maps in the rotation when the map loads.
Script 1 OPEN {
int size = GetMapRotationSize();
Log(d: size, s: " maps are in the rotation.");
 
// Note: the list starts at 1; position 0 is the current map.
for (int i = 1; i <= size; i++)
{
Log(
d: i, s: ". ",
s: GetMapRotationInfo(i, MAPROTATION_LumpName), s: " - ",
s: GetMapRotationInfo(i, MAPROTATION_Name)
);
}
}
</syntaxhighlight>


== See also ==
== See also ==