What would the code looks like if I want turn on/off the spotlight from script?
-
- Posts: 2
- Joined: 17 Nov 2017, 15:53
What would the code looks like if I want turn on/off the spotlight from script?
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?
Hello,
try with:
where bit 0 of state represents the on/off flag.
Cheers
try with:
Code: Select all
simSetLightParameters(lightObjectHandle,state)
Cheers
-
- Posts: 2
- Joined: 17 Nov 2017, 15:53
Re: What would the code looks like if I want turn on/off the spotlight from script?
I have this, but it still does not working
if (buttonID == 15) then
simSetLightParameters("the name of my spotlight ,0)
end
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?
Your code doesn't say anything. What is buttonID???
Cheers
Cheers