This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:setscriptvar [2014/01/24 17:25] – pawel345 | crpl:docs:setscriptvar [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | ~~DISCUSSION:off~~ |
| <- [[crpl: | <- [[crpl: | ||
| ===== SetScriptVar | ===== SetScriptVar | ||
| Line 11: | Line 11: | ||
| 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 build-in 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(< | ||
| + | </ | ||
| + | |||
| + | |||
| === Examples === | === Examples === | ||
| Line 23: | Line 41: | ||
| : | : | ||
| - | " | + | CreateUnit(" |
| - | <-unit " | + | AddScriptToUnit(<-unit " |
| - | <-unit " | + | SetScriptVar(<-unit " |
| - | <-unit " | + | SetScriptVar(<-unit " |
| - | <-unit " | + | SetScriptVar(<-unit " |
| - | <-unit " | + | SetImage(<-unit " |
| - | <-unit " | + | SetImagePositionZ(<-unit " |
| - | <-unit " | + | SetImageRotation(<-unit " |
| </ | </ | ||
| < | < | ||
| - | SetScriptVar(< | + | SetScriptVar(< |
| - | SetScriptVar(< | + | SetScriptVar(< |
| SetScriptVar(< | SetScriptVar(< | ||
| SetScriptVar(< | SetScriptVar(< | ||
| Line 56: | Line 74: | ||
| SetScriptVar(< | SetScriptVar(< | ||
| SetScriptVar(< | SetScriptVar(< | ||
| + | |||
| + | === List of vars === | ||
| + | |||
| + | Emitter | ||
| + | Script: 0 | ||
| + | | ||
| + | STARTTIME | ||
| + | Number of frames before emitter starts production. | ||
| + | FINISHTIME | ||
| + | Number of frames before emitter halts production. Defaults to 2147483647 (the maximum signed 32 bit integer). | ||
| + | PRODUCTIONINTERVAL | ||
| + | Number of frames between each creeper production. | ||
| + | PRODUCTIONAMT | ||
| + | The amount of creeper produced per production, multiplied by 1000000. | ||
| + | |||
| + | SporeTower | ||
| + | Script: 0 | ||
| + | | ||
| + | STARTTIME | ||
| + | The number of frames before the tower starts producing spores. | ||
| + | WAVEINTERVAL | ||
| + | The number of frames between each wave of spores. | ||
| + | WAVECOUNT | ||
| + | The number of spores in each wave. | ||
| + | SPOREPAYLOAD | ||
| + | The amount of creeper that each spores dumps on the map when it lands, multiplied by 1000000. | ||
| + | |||
| + | AETower | ||
| + | Script: 0 | ||
| + | | ||
| + | RANGE | ||
| + | The size of the exclusion zone. | ||
| + | |||
| + | RunnerNest | ||
| + | Script: 0 | ||
| + | | ||
| + | SPAWNINTERVAL | ||
| + | The number of frames between the production of each runner | ||
| + | MAXPOPULATION | ||
| + | The maximum number of runners produced by this nest on the map at any given time. | ||
| + | MOVESPEED | ||
| + | The movement speed in pixels per second of each runner. | ||
| + | RUNNERMAXHEALTH | ||
| + | The maximum health and starting health of each runner. | ||
| + | CREEPERPAYLOAD | ||
| + | The amount of creeper that each runner dumps to the map when it dies or is killed, multiplied by 1000000. | ||
| + | |||
| + | Inhibitor | ||
| + | Script: 0 | ||
| + | | ||
| + | STARTTIME | ||
| + | The number of frames before the inhibitor starts producing creeper. | ||
| + | PRODUCTIONINTERVAL | ||
| + | The number of frames between each production of creeper. | ||
| + | PRODUCTIONAMT | ||
| + | The amount of creeper produced. | ||
| + | RANGE | ||
| + | The range of the aerial exclusion zone. Set to 0 for none. | ||
| + | |||
| + | ResourcePack | ||
| + | Script: 0 | ||
| + | | ||
| + | AMT | ||
| + | The starting amount that the pack carries. Must be less than MAXAMT. | ||
| + | MAXAMT | ||
| + | The maximum amount that the pack carries. | ||
| + | RESOURCETYPE | ||
| + | The type of resource that the pack carries. Either ENERGY, ORE or AETHER. | ||
| + | |||
| + | Guppy Pad (added in 1.68) | ||
| + | Script: "" | ||
| + | | ||
| + | MODE | ||
| + | The type of cargo that the guppy ferries. Either PACKET, ORE or AC. | ||
| + | |||
| + | Artifact of Odin (AOO) | ||
| + | Script: 0 | ||
| + | | ||
| + | TYPE | ||
| + | The type of AoO. Either FREEZE, MASS or CONVERT. | ||
| + | | ||
| + | Tech Artifact (Added in 1.83) | ||
| + | | ||
| + | |||
| + | COUNT | ||
| + | The number of items the tech artifact should unlock. | ||