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 44: | Line 44: | ||
"clever tricks and" ; some are also evil | "clever tricks and" ; some are also evil | ||
"is guaranteed" | "is guaranteed" | ||
"to be enjoyable" | "to be enjoyable." | ||
" " | " " | ||
"Have fun!" | "Have fun!" | ||
Line 62: | Line 62: | ||
== Advanced scripting == | == Advanced scripting == | ||
In addition to the features described above, C2G files can support some additional keywords that provide extra features. '''Note that any information beyond this point may be incomplete or inaccurate.''' | In addition to the features described above, C2G files can support some additional keywords that provide extra features. '''Note that any information beyond this point may be incomplete or inaccurate.''' | ||
=== Score === | === Score === | ||
Line 144: | Line 123: | ||
Replace "<#>" with the desired time limit for the set. This will ignore any time limits set for individual levels. Time limits will be carried over from one level to the next, and restarting the level does not reset the time limit. [[Time bonus]]es and [[time penalty|time penalties]] can still be used. After the time limit reaches 0, or if a level is skipped, all future levels will be untimed. | Replace "<#>" with the desired time limit for the set. This will ignore any time limits set for individual levels. Time limits will be carried over from one level to the next, and restarting the level does not reset the time limit. [[Time bonus]]es and [[time penalty|time penalties]] can still be used. After the time limit reaches 0, or if a level is skipped, all future levels will be untimed. | ||
=== | === Exit choices === | ||
If a level has several [[exit]]s, C2G scripting can be used to send the player to different levels depending on what exit is entered. | |||
In order to do this, each level must be given a label starting with a pound (#) character. For example: | |||
<nowiki>#bonuslevel | |||
In order to do this, | |||
<nowiki># | |||
script | script | ||
" | "Congratulations!" | ||
"the secret | "You have reached" | ||
"the secret level!" | |||
" | map "BonusLevel.c2m"</nowiki> | ||
In the example above, the level BonusLevel.c2m as well as the preceding text are given the label "bonuslevel". | |||
Exits are numbered in reading order, starting at 1; it is unknown if there is a limit. In order to use the feature, after calling the "map" of the level containing the exits, a line similar to this will be required: | |||
<nowiki> <#> exit == do goto #label</nowiki> | <nowiki> <#> exit == do goto #label</nowiki> | ||
Replace <#> with the exit number, and #label with the label name (including the #). For example: | Replace <#> with the exit number, and #label with the label name (including the #). For example: | ||
Line 218: | Line 148: | ||
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 | 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. | ||
<!-- what if there are more exits than entries though? --> | |||
=== Editor === | === Editor === | ||
Line 272: | Line 159: | ||
The following lines | The following lines | ||
<nowiki>1 level = | <nowiki>1 level = | ||
50 | 50 highspeed = 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. | ||
[[Category:File formats]] | [[Category:File formats]] |