Better periodically changing ambient fog (a kind of dynamic weather implement)

As well know, we can use volfog_snow_affect or volfog_sand_storm_affect

To create an environmental fog that can change periodically.

But this entity alone couldn’t achieve the effect I wanted to create.

I might want the battlefield to have 20 minutes of clear clear weather and 5 minutes of foggy weather.

I found a way to do this

This can give the scene a 5-minute foggy scene every 20 minutes, and relatively clear weather in the 20-minute interval.

game_options{
  _override:b=yes
  
  "volfog_snow__intensityByCamera:object"{
    plane_fps_cam:r=0.3
    respawn_cam:r=0.1
  }
}

big_action_volfog_snow_affect{
  _use:t="volfog_snow_affect"
  _use:t="big_action_noop_phys_activator_trigger"
  mineActivatorTemplate:t="create_big_action_volfog_snow_heavy_affect"
  game_effect__timeToDestroy:r=1200.0

  volfog_snow__intensityChangeTime:r=300.0
  volfog_snow__intensity:r=0.01
  volfog_snow__intensitySpeed:r=0.05
  volfog_snow__maxIntensity:r=0.06
  volfog_snow__maxIntensityRange:p2=0.01, 0.05

  "volfog_snow__intensityByCamera:object"{
    plane_fps_cam:r=0.3
    respawn_cam:r=0.1
  }
}

big_action_volfog_snow_heavy_affect{
  _use:t="volfog_snow_affect"
  _use:t="big_action_noop_phys_activator_trigger"
  mineActivatorTemplate:t="create_big_action_volfog_snow_affect"
  game_effect__timeToDestroy:r=360.0

  volfog_snow__intensityChangeTime:r=60.0
  volfog_snow__intensity:r=0.06
  volfog_snow__intensitySpeed:r=0.05
  volfog_snow__maxIntensity:r=1.8
  volfog_snow__maxIntensityRange:p2=0.2, 1.8

  "volfog_snow__intensityByCamera:object"{
    plane_fps_cam:r=0.3
    respawn_cam:r=0.1
  }
}

create_big_action_volfog_snow_heavy_affect_on_create{
  "on_explosion__create:list<t>"{
    tmplt:t="big_action_volfog_snow_heavy_affect"
  }
}

create_big_action_volfog_snow_heavy_affect{
  _use:t="big_action_noop_phys_activator"
  on_create__addShellTemplate:t="create_big_action_volfog_snow_heavy_affect_on_create"
}

create_big_action_volfog_snow_affect_on_create{
  "on_explosion__create:list<t>"{
    tmplt:t="big_action_volfog_snow_affect"
  }
}

create_big_action_volfog_snow_affect{
  _use:t="big_action_noop_phys_activator"
  on_create__addShellTemplate:t="create_big_action_volfog_snow_affect_on_create"
}


Features in this topic base on

8 Likes