User Tools

Site Tools


crpl:docs:setscriptvar

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- Script Commands

SetScriptVar

ArgumentsResultNotation
Unit UID, script name, var name, var value i1 s1 s2 d1 –

Description

Sets the named variable on the specified unit script to a value.

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/setscriptvar.1358532139.txt.gz · Last modified: 2014/10/01 15:02 (external edit)