Notifications
Clear all

[Closed] [environment] activate/desactivate atmospherics

Hi,
need a little help, as it is shown in the picture

want to contol ie activate/desactivate the atmosphere checkbox from the panel i created.
as i’m dealing not only with those atmos shown on the picture but alot more, i created the script to handle its activations . i’m not a scripter i know only the basics of it , if someone can help ?

checkbox chk1 "AB_Right" pos:[16,24] width:72 height:24
   on chk1 changed state do
   	( what should i put in here )
   

Thanks :)!!

6 Replies

I think you need to be a little clearer in what you’re asking for?

Are you asking for something to check all the boxes on the right once you check the box on the left?

The Code you pasted is that from the rollout on the left or on the right? Maybe post more of your code so people can see what you’re trying to do?

sorry if i wasn’t clear on my request !
the right panel is the one i created to control the activations of each effect added in the left one , btw the left floater is the environment and effect ( button “8” or renderer->environment).
what i need is that piece of code that allow me to check or uncheck the ‘‘active’’ checkbox (the left one)

the code

rollout atmos "on/off switcher" width:208 height:264
(
checkbox chk1 "AB_Right" pos:[16,24] width:72 height:24 checked:false
checkbox chk2 "AB_left" pos:[16,48] width:72 height:24 checked:false
checkbox chk3 "AB_set01" pos:[16,72] width:72 height:24 checked:false
checkbox chk4 "AB_set02" pos:[16,96] width:72 height:24 checked:false
checkbox chk5 "AB_set03" pos:[16,120] width:72 height:24 checked:false
checkbox chk6 "AB_set04" pos:[16,144] width:72 height:24 checked:false
checkbox chk7 "AB_set05" pos:[16,168] width:72 height:24 checked:false
checkbox chk8 "AB_set06" pos:[16,192] width:72 height:24 checked:false
checkbox chk9 "AB_set07" pos:[16,216] width:88 height:24 checked:false
GroupBox grp1 "Atmospherics" pos:[8,8] width:270 height:240
 
 
on chk1 changed state do
(
)
on chk2 changed state do
(
)
.
.
.
.
on chk9 changed state do
(
)
 
)

hope this is clear enough , thanks

Try this:

setActive (getAtmospheric 1) false
or
setActive (getAtmospheric 1) true

where 1 is the index of the atmosphere

look up in the script help: “Atmospheric Effects Common Properties, Operators, and Methods”

If you need more explicit help let me know and I’ll help you create the script.

thanks Impus i appreciate your help . its working but not in the way i want , i mean when its “true” or “false” , its gonna stay in that state no matter what gonna happen from the panel i created. what i want is
when i check the box it activate the effect, and vice versa uncheck –>desactivate

thanks

You need to apply what I wrote to your events.

i.e.

 rollout atmos "on/off switcher" width:208 height:264
 (
 checkbox chk1 "AB_Right" pos:[16,24] width:72 height:24 checked:false
 checkbox chk2 "AB_left" pos:[16,48] width:72 height:24 checked:false
 checkbox chk3 "AB_set01" pos:[16,72] width:72 height:24 checked:false
 checkbox chk4 "AB_set02" pos:[16,96] width:72 height:24 checked:false
 checkbox chk5 "AB_set03" pos:[16,120] width:72 height:24 checked:false
 checkbox chk6 "AB_set04" pos:[16,144] width:72 height:24 checked:false
 checkbox chk7 "AB_set05" pos:[16,168] width:72 height:24 checked:false
 checkbox chk8 "AB_set06" pos:[16,192] width:72 height:24 checked:false
 checkbox chk9 "AB_set07" pos:[16,216] width:88 height:24 checked:false
 GroupBox grp1 "Atmospherics" pos:[8,8] width:270 height:240
  
  
 on chk1 changed state do
 (
 
  setActive (getAtmospheric 1) state
 )
 )
  

Impus, your are great , i put true or false instead of ”state ‘’

thanks a bunch man