C2G: Difference between revisions

2 bytes removed ,  21 May 2021
no edit summary
No edit summary
No edit summary
Line 272: Line 272:
50 speed = continue replay | silent | flags =</nowiki>
50 speed = continue replay | silent | flags =</nowiki>
added to the beginning of the file (after the set name) will cause the game to automatically replay the recorded solutions for all levels in the set, in extremely high speed. This can be used to quickly verify that all levels are solvable and have recorded replays.
added to the beginning of the file (after the set name) will cause the game to automatically replay the recorded solutions for all levels in the set, in extremely high speed. This can be used to quickly verify that all levels are solvable and have recorded replays.
=== Chaining ===
Scripts can be "chained" using the chain directive. This can be useful for compartmentalizing long scripts associated with particular levels.
<nowiki>chain "anotherscript.c2g"</nowiki>
<nowiki>chdir "anotherdirectory\"
chain "scriptinanotherdirectory.c2g"</nowiki>
Note that if the first c2g file CC2 reads chains to another script but does not provide a map itself, CC2 will say the levelset is invalid. This is because it specifically checks the first c2g it reads for the use of "map" followed by a valid map. To avoid this, put a valid map ''after'' the chain, such that it will never be accessed since the parser will be chained away from the script before reaching it.


== Comments box ==
== Comments box ==
Line 277: Line 286:
  <nowiki>[COM]</nowiki>
  <nowiki>[COM]</nowiki>
followed, on subsequent lines, by the C2G parameters.
followed, on subsequent lines, by the C2G parameters.
=== Chaining ===
Scripts can be "chained" using the chain directive. This can be useful for compartmentalizing long scripts associated with particular levels.
<nowiki>
chain "anotherscript.c2g"
</nowiki>
<nowiki>
chdir "anotherdirectory\"
chain "scriptinanotherdirectory.c2g"
</nowiki>
Note that if the first c2g file CC2 reads chains to another script but does not provide a map itself, CC2 will say the levelset is invalid. This is because it specifically checks the first c2g it reads for the use of "map" followed by a valid map. To avoid this, put a valid map ''after'' the chain, such that it will never be accessed since the parser will be chained away from the script before reaching it.


== Reference ==
== Reference ==
trusted-editors
331

edits