main()
{
	precacheFX();
	ambientFX();
	level.scr_sound["flak88_explode"]	= "flak88_explode";
}

precacheFX()
{
	if(level.wwx_ambdustfx) level._effect["dust_wind"]		= loadfx ("fx/dust/dust_wind_brown_thick.efx");
	if(level.wwx_ambfirefx) level._effect["tank_fire_engine"] 			= loadfx ("fx/fire/tank_fire_engine.efx");	
	
      level._effect["wakka2"]			= loadfx ("fx/misc/wind_desert_leaves.efx");

      if(level.wwx_ambsmokefx)
      {
	level._effect["wakka4"]		= loadfx ("fx/smoke/smoke_plumeBG_toujane.efx");
	level._effect["wakka5"]		= loadfx ("fx/smoke/vehicle_steam.efx");
	level._effect["wakka6"]		= loadfx ("fx/smoke/damaged_vehicle_smoke.efx");
      }	
}

ambientFX()
{
	
	//original dust fx DO NOT DELETE
      if(level.wwx_ambdustfx)
      {
	maps\mp\_fx::loopfx("dust_wind", (-365,5582,196), 3, (-365,5582,206));
	maps\mp\_fx::loopfx("dust_wind", (-774,6579,360), 3, (-774,6579,370));
	maps\mp\_fx::loopfx("dust_wind", (937,6746,399), 3, (937,6746,409));
	maps\mp\_fx::loopfx("dust_wind", (1144,5481,246), 3, (1144,5481,256));
	maps\mp\_fx::loopfx("dust_wind", (2664,5484,200), 3, (2664,5484,210));
	maps\mp\_fx::loopfx("dust_wind", (3558,4504,95), 3, (3558,4504,105));
	maps\mp\_fx::loopfx("dust_wind", (3714,3069,64), 3, (3714,3069,74));
	maps\mp\_fx::loopfx("dust_wind", (1978,-29,23), 3, (1978,-29,33));
	maps\mp\_fx::loopfx("dust_wind", (3407,-624,79), 3, (3407,-624,89));
	maps\mp\_fx::loopfx("dust_wind", (6264,-913,116), 3, (6264,-913,126));
	maps\mp\_fx::loopfx("dust_wind", (-435,723,125), 3, (-435,723,135));
	maps\mp\_fx::loopfx("dust_wind", (423,1286,112), 3, (423,1286,122));
	}
	
	//Fire for where i have destroyed vehciles
      if(level.wwx_ambfirefx)
      {
	maps\mp\_fx::loopfx("tank_fire_engine", (-523,1688,7), 3, (-523,1688,17));
	maps\mp\_fx::loopfx("tank_fire_engine", (3495,4097,32), 3, (3495,4097,42));
      }

	//smoke for destroyed vehciles
      if(level.wwx_ambsmokefx)
      {
	maps\mp\_fx::loopfx("wakka6", (-1104,3958,84), 3, (-1104,3958,94));
	maps\mp\_fx::loopfx("wakka6", (3495,4097,32), 3, (3495,4097,42));
	//Large Thick Smoke, nice to use 1 or two only	
	maps\mp\_fx::loopfx("wakka4", (-523,1688,27), 3, (-523,1688,37));
	}

	//LEAVES Blowing around oasis
	maps\mp\_fx::loopfx("wakka2", (2515,746,16), 3, (2515,746,26));
	maps\mp\_fx::loopfx("wakka2", (2594,1068,36), 3, (2594,1068,46));

}