crpl:docs:addscripttounit
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision |
crpl:docs:addscripttounit [2013/01/14 19:01] – created chani | crpl:docs:addscripttounit [2025/02/14 14:57] (current) – external edit 127.0.0.1 |
---|
TODO | <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#script_commands|Script Commands]] |
| ===== AddScriptToUnit ===== |
| |
| ^Arguments^Result^Notation^ |
| |Unit UID and script name| |''i1 s1 -- ''| |
| |
| |
| === Description === |
| Adds a script to a CRPLCore. After creating a CRPLCore, many times you will want to add one or more scripts to the core. |
| |
| === Examples === |
| <code> |
| @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 |
| </code> |
crpl/docs/addscripttounit.1358190108.txt.gz · Last modified: 2025/02/14 14:56 (external edit)