Page 1 of 1
What would the code looks like if I want turn on/off the spotlight from script?
Posted: 16 Jan 2018, 12:21
by sergio_ledzep
I have a custom UI and I just want to know what would the code looks like if i want turn on/off the spotlights every time that I press a button.
Re: What would the code looks like if I want turn on/off the spotlight from script?
Posted: 18 Jan 2018, 08:17
by coppelia
Hello,
try with:
Code: Select all
simSetLightParameters(lightObjectHandle,state)
where bit 0 of state represents the on/off flag.
Cheers
Re: What would the code looks like if I want turn on/off the spotlight from script?
Posted: 24 Jan 2018, 13:15
by sergio_ledzep
I have this, but it still does not working
if (buttonID == 15) then
simSetLightParameters("the name of my spotlight ,0)
end
Re: What would the code looks like if I want turn on/off the spotlight from script?
Posted: 27 Jan 2018, 16:00
by coppelia
Your code doesn't say anything. What is buttonID???
Cheers