How to set Entity Color In Procedure

Feb 2, 2012 at 10:01 AM
Edited Feb 2, 2012 at 10:03 AM

How can i set the entity color. Read my script. It Doesn't Work For me.

StartSimulationEngine  "SimState/basicsim.xml"
AddNewEntity    ent1  /Position:0  0.5  0
AddBoxShape   
 /Dimensions:1.0  0.5  0.6   /Mass:100
 /DiffuseColor:1  0  0  0
/EnableContactNotifications:true
/Procedure_ContactNotify:proc1
AddPioneer3DX    robot  /Position:0  0  0
AddTextSpriteEntity    sprite1
/Position:0.644  0.32  -41
/Text:Hello World!
AddSonarEntity    sonar1
/Position:0  0.4  -0.3
/ParentEntity:robot
FlushScript  
Procedure  proc1
ent1.SetColor(0,0,0,0)
End