Notifications
Clear all

[Closed] Placing all atmospherics in array

Hi, i was trying to get all the atmospherics into an array, but the only thing ive written that works seems far from the best way to do it. So i wondered if someone might know a better way

this is the code i use atm.

atmosArray = #()
 for i = 1 to 10 do ( try (append atmosArray (getAtmospheric i))catch(exit))
 print atmosArray
2 Replies

atmosArray = for i=1 to numAtmospherics collect (getAtmospheric i)

or for active effects only:


 atmosArray = for i=1 to numAtmospherics where isActive  (a = getAtmospheric i) collect a
 

Awesome! Thanks a lot, didnt see numAtmospherics when i was searching, which made it quite hard