This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:setscriptvar [2014/02/05 21:05] – added AOO Grayzzur | 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 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(< | ||
| + | </ | ||
| Line 26: | Line 41: | ||
| : | : | ||
| - | 	" | + | 	CreateUnit(" | 
| - | 	<-unit " | + | 	AddScriptToUnit(<-unit " | 
| - | 	<-unit " | + | 	SetScriptVar(<-unit " | 
| - | 	<-unit " | + | 	SetScriptVar(<-unit " | 
| - | 	<-unit " | + | 	SetScriptVar(<-unit " | 
| - | 	<-unit " | + | 	SetImage(<-unit " | 
| - | 	<-unit " | + | 	SetImagePositionZ(<-unit " | 
| - | 	<-unit " | + | 	SetImageRotation(<-unit " | 
| </ | </ | ||
| Line 139: | Line 154: | ||
| TYPE | TYPE | ||
| The type of AoO. Either FREEZE, MASS or CONVERT. | 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. | ||