This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
crpl:docs:setscriptvar [2014/10/12 18:46] – Discussion status changed virgilw | crpl:docs:setscriptvar [2018/05/10 12:13] – improved notes, added more information Grabz | ||
---|---|---|---|
Line 12: | Line 12: | ||
Can also set the variables of built-in units like spore towers and emitters. | Can also set the variables of built-in units like spore towers and emitters. | ||
You can check the names of built-in variable for units on the [[crpl: | You can check the names of built-in variable for units on the [[crpl: | ||
- | < | + | < |
- | in the map editor dialog. | + | |
- | be 1000000 on the internal int. The values | + | **Interval** values for Emitters, Inhibitors, Spore Towers, Runner Nests should |
- | payload | + | |
+ | This is what setting an Emitter with 32.5 power and 2.5 second interval would look like: | ||
+ | |||
+ | < | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | If you're procedurally generating a unit, and you want to give it a delay, you need to add the current time elapsed to it. | ||
+ | |||
+ | This is what setting a delay of 10 seconds would look like: | ||
+ | < | ||
+ | SetScriptVar(< | ||
+ | </ | ||