Please create an account or Login! Have fun!

C2G: Difference between revisions

Jump to navigation Jump to search
699 bytes added ,  21 May 2021
no edit summary
No edit summary
No edit summary
Line 277: Line 277:
  <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

Navigation menu