This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
namedscripts [2016/05/07 18:42] – created korshun | namedscripts [2018/02/19 12:52] (current) – korshun | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Named scripts in Zandronum ====== | + | ====== Named scripts in Zandronum |
+ | |||
+ | <note warning> | ||
+ | |||
+ | Zandronum <3.0 does **not** support actual named scripts, but you can use #define to give names to script numbers: | ||
+ | |||
+ | < | ||
+ | #define myproject_somescript 301 | ||
+ | #define myproject_enter 302 | ||
+ | |||
+ | script myproject_somescript (void) | ||
+ | { | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | script myproject_enter ENTER | ||
+ | { | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | You can even use these script names in decorate if you define them as decorate constants: | ||
+ | |||
+ | < | ||
+ | const int myproject_somescript = 301; | ||
+ | const int myproject_enter 302; | ||
+ | </ | ||
+ | |||
+ | And then use them in some actor' | ||
+ | < | ||
+ | TNT1 A 0 ACS_ExecuteAlways(myproject_somescript, | ||
+ | </ | ||
- | Zandronum does **not** support actual named scripts, but you can use #define to give names to script number. |