User Tools

Site Tools


crpl:docs:addscripttounit

<- CRPL reference <- Script Commands

AddScriptToUnit

ArgumentsResultNotation
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

@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 
crpl/docs/addscripttounit.txt · Last modified: 2021/02/05 11:24 by Karsten75