This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
crpl:docs:setscriptvar [2013/01/14 14:59] – virgilw | crpl:docs:setscriptvar [2014/01/27 17:40] – Added Guppy stuff Clean0nion | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~DISCUSSION~~ | ||
+ | <- [[crpl: | ||
===== SetScriptVar | ===== SetScriptVar | ||
Line 7: | Line 8: | ||
=== Description === | === Description === | ||
- | Sets the named variable on the specified unit script to a value. | + | Sets the named variable on the specified unit script to a value. |
+ | |||
+ | 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: | ||
+ | < | ||
+ | in the map editor dialog. There is room for 6 digits after the decimal. 1.0 in the dialog would | ||
+ | be 1000000 on the internal int. The values in the sample below correlate to 25.0 for the spore | ||
+ | payload and 0.8 for the emitter production amount.</ | ||
+ | |||
+ | |||
=== Examples === | === Examples === | ||
+ | |||
< | < | ||
@CreateBullet | @CreateBullet | ||
Line 22: | Line 34: | ||
<-unit " | <-unit " | ||
<-unit " | <-unit " | ||
- | </ | + | </ |
+ | |||
+ | < | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | |||
+ | < | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | SetScriptVar(< | ||
+ | |||
+ | < | ||
+ | CreateUnit(" | ||
+ | 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. |