Page 1 of 1

Environmental Nodes

Unread postPosted: Sat Apr 09, 2016 8:16 am
by JerryC
I already know that you can specify a particular node (part) in an Asset to show during the day or night by naming the object fx_day or fx_night. Does anyone know if you can also do this with environmental variables? Some thing like having the object only show when it's raining? (fx_rain?)

Re: Environmental Nodes

Unread postPosted: Sat Apr 09, 2016 9:19 am
by mrennie
JerryC wrote:I already know that you can specify a particular node (part) in an Asset to show during the day or night by naming the object fx_day or fx_night. Does anyone know if you can also do this with environmental variables? Some thing like having the object only show when it's raining? (fx_rain?)


Not as far as I know, but I used nodes textured with weather effects to create rain droplets on the outside of the cab windows in the FEF-3. In the script, I make these calls to see if it's raining:

Code: Select all
         
                        local PrecipitationType = SysCall("WeatherController:GetCurrentPrecipitationType")
         -- 0 = rain or clear, 1 = sleet, 2 = hail, 3 = snow
         
         local PrecipitationDensity = SysCall("WeatherController:GetPrecipitationDensity")
         -- 0 = none, 0.5 = rainy, 1.0 = stormy


Then it's just a matter of activating or deactivating the outside rain nodes accordingly, although there is also the complication of having to deactivate the outside ones when you're in cab view.

Re: Environmental Nodes

Unread postPosted: Sat Apr 09, 2016 11:36 am
by JerryC
That is a step in the right direction. The node that i'm targeting is "photosensitive", so it would switch on under darker conditions such as storm or fog. The node is not on the locomotive though, so I also have to call the car it is on.

Thanks!