This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:define2 [2021/01/14 22:42] – Sanian | 4rpl:commands:define2 [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Description ===== | ===== Description ===== | ||
- | Input variables must start with a double | + | Hidden input variables must start with '' |
+ | [[4rpl: | ||
+ | any of the actual code in a script. | ||
+ | They define a variable named **VARNAME **with a default value of **VAL** which may be of type int, float or string. | ||
- | Unlike normal input variables, hidden input variables do not show up in a unit's Script Settings when selected in the editor, they are just a convenient way for defining some standard values at the start of a script. | + | Unlike normal input variables, hidden input variables do not show up in a unit's Script Settings when selected |
+ | in the editor, they are just a convenient way for defining some standard values at the start of a script. | ||
- | Input variables are created at the same time as the unit itself (even if the game is paused and the script hasn't executed once) and assigned the default value **VAL**, which may be overwritten if the initParams of a [[4rpl: | + | Input variables are created at the same time as the unit itself (even if the game is paused and the script |
+ | hasn't executed once) and assigned the default value **VAL**, which may be overwritten if the initParams | ||
+ | of a [[4rpl: | ||
===== Examples ===== | ===== Examples ===== | ||
Line 22: | Line 28: | ||
</ | </ | ||
+ | === See Also === | ||
+ | * [[4rpl: | ||
+ | |||
+ | < | ||
~~NOTOC~~ | ~~NOTOC~~ | ||