Please create an account or Login! Have fun!
Editing C2G
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 189: | Line 189: | ||
=== Entry choices === | === Entry choices === | ||
If a level has several [[Player character]]s, C2G scripting can be used to | If a level has several [[Player character]]s, C2G scripting can be used to set the player which will appear based on conditions. | ||
Players are numbered in reading order, starting at 1; there does not appear to be any limit. In order to use the feature, before calling the "map" of the level containing the players, the "enter" variable must be set, for example: | Players are numbered in reading order, starting at 1; there does not appear to be any limit. In order to use the feature, before calling the "map" of the level containing the players, the "enter" variable must be set, for example: | ||
Line 198: | Line 198: | ||
map UltimatePain.c2m</nowiki> | map UltimatePain.c2m</nowiki> | ||
In the above example, with about 50% chance, the second | In the above example, with about 50% chance, the second players will appear in the level UltimatePain.c2m instead of the first one. | ||
CC2 crashes if "enter" is set to a value which does not lead to a player. | CC2 crashes if "enter" is set to a value which does not lead to a player. | ||
=== Exit choices === | === Exit choices === | ||
Line 218: | Line 218: | ||
script | script | ||
"This is the end."</nowiki> | "This is the end."</nowiki> | ||
In the example above, the game will load the level stored in the file ChooseYourFuture.c2m; if the player exits using the first exit in reading order, the game will then display the THIS IS THE END message. If the player exits using the second exit, however, the game will load the level in the file SuperSecretFinalLevel.c2m instead, and the THIS IS THE END message will be displayed after the level has been solved. | In the example above, the game will load the level stored in the file ChooseYourFuture.c2m; if the player exits using the first exit in reading order, the game will then display the THIS IS THE END. message. If the player exits using the second exit, however, the game will load the level in the file SuperSecretFinalLevel.c2m instead, and the THIS IS THE END message will be displayed after the level has been solved. | ||
If there are several players in the level, the exit used by the last player to finish the level will be the one used by the C2G script. If an invalid label is called, or no label is assigned for the exit that was used, the game will continue to work through the C2G file as it would normally. | If there are several players in the level, the exit used by the last player to finish the level will be the one used by the C2G script. If an invalid label is called, or no label is assigned for the exit that was used, the game will continue to work through the C2G file as it would normally. | ||
Line 247: | Line 247: | ||
map "Normal.c2m"</nowiki> | map "Normal.c2m"</nowiki> | ||
In the example above, Normal.c2m will be level 9. | In the example above, Normal.c2m will be level 9. | ||
=== Speed === | === Speed === | ||
Line 274: | 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. | ||
== Comments box == | == Comments box == | ||
Line 503: | Line 461: | ||
| constant | | constant | ||
| <pre>continue</pre> | | <pre>continue</pre> | ||
| Value: 0x1<br />When set in flags, automatically continue to the next level. '''This only works if 0x2 (replay) is also set and the replays make it to the exit''', otherwise exiting a level will do nothing and you will not be able to continue to the next level | | Value: 0x1<br />When set in flags, automatically continue to the next level. '''This only works if 0x2 (replay) is also set and the replays make it to the exit''', otherwise exiting a level will do nothing and you will not be able to continue to the next level. | ||
|- | |- | ||
| SILENT | | SILENT |