This is an old revision of the document!
~~DISCUSSION~~ <- CRPL reference <- Script Commands
Arguments | Result | Notation |
---|---|---|
Unit UID, script name, var name, var value | i1 s1 s2 d1 – |
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.
@CreateBullet :CreateBullet "CRPLCore" CurrentX CurrentY CreateUnit ->unit <-unit "CRBullet.crpl" AddScriptToUnit <-unit "CRBullet.crpl" "targetX" <-targetX SetScriptVar <-unit "CRBullet.crpl" "targetY" <-targetY SetScriptVar <-unit "CRBullet.crpl" "payload" <-payload SetScriptVar <-unit "main" "Custom2" SetImage <-unit "main" -0.01 SetImagePositionZ <-unit "main" self "barrel" GetImageRotation SetImageRotation
CreateUnit("SPORETOWER" 0 0) ->sporeTowerUID SetScriptVar(<-sporeTowerUID 0 "startTime" 3600) SetScriptVar(<-sporeTowerUID 0 "waveInterval" 3600) SetScriptVar(<-sporeTowerUID 0 "waveCount" 1) SetScriptVar(<-sporeTowerUID 0 "sporePayload" 25000000)
CreateUnit("EMITTER" 31 8) ->unit SetScriptVar(<-unit 0 "productionInterval" 45) SetScriptVar(<-unit 0 "productionAmt" 800000) SetScriptVar(<-unit 0 "startTime" 45)
CreateUnit("RUNNERNEST" <-spawnX <-spawnY) ->uid SetScriptVar(<-uid 0 "moveSpeed" 1) SetScriptVar(<-uid 0 "spawnInterval" 150) SetScriptVar(<-uid 0 "maxPopulation" 5) SetScriptVar(<-uid 0 "runnerMaxHealth" 5) SetScriptVar(<-uid 0 "creeperPayload" 75000000)