• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Problem with weather effects

Status
Not open for further replies.
Level 20
Joined
Feb 23, 2015
Messages
243
Hi,
I've made a trigger that creates (or rather should create) weather effect in nearly circular area around specific kind of units, but it doesn't work. What did I do wrong?
  • RadiationEffect
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
    • For each (Integer Rad_WeatherDeleteInteger) from 0 to Rad_WeatherInteger, do (Actions)
      • Loop - Actions
        • Environment - Turn Rad_WeatherEffect[Rad_WeatherDeleteInteger] off.
        • Environment - Remove Rad_WeatherEffect[Rad_WeatherDeleteInteger]
    • Set Rad_WeatherInteger = 0
    • For each (Integer Rad_MainLoopInteger) from 1 to Rad_CasterCounter, do (Actions)
      • Loop - Actions
        • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
          • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) equals to Rad_CasterUnitType[Rad_MainLoopInteger]
            • Then - Actions
              • Set Rad_Caster = (Picked unit)
              • Set Rad_CasterPosition = (Position of Rad_Caster)
              • Set Rad_Region = (Region centered at Rad_CasterPosition with size (((Cos(45.00)) x (2.00 x Rad_Radius)), ((Sin(45.00)) x (2.00 x Rad_Radius))))
              • Environment - Create at Rad_Region the weather effect Blue Fog
              • Set Rad_WeatherEffect[Rad_WeatherInteger] = (Last created weather effect)
              • Set Rad_WeatherInteger = (Rad_WeatherInteger + 1)
              • Set Rad_Region = (Region centered at Rad_CasterPosition with size (((Cos(30.00)) x (2.00 x Rad_Radius)), ((Sin(30.00)) x (2.00 x Rad_Radius))))
              • Environment - Create at Rad_Region the weather effect Blue Fog
              • Set Rad_WeatherEffect[Rad_WeatherInteger] = (Last created weather effect)
              • Set Rad_WeatherInteger = (Rad_WeatherInteger + 1)
              • Set Rad_Region = (Region centered at Rad_CasterPosition with size (((Cos(60.00)) x (2.00 x Rad_Radius)), ((Sin(60.00)) x (2.00 x Rad_Radius))))
              • Environment - Create at Rad_Region the weather effect Blue Fog
              • Set Rad_WeatherEffect[Rad_WeatherInteger] = (Last created weather effect)
              • Set Rad_WeatherInteger = (Rad_WeatherInteger + 1)
              • Set Rad_Region = (Region centered at Rad_CasterPosition with size (((Cos(15.00)) x (2.00 x Rad_Radius)), ((Sin(15.00)) x (2.00 x Rad_Radius))))
              • Environment - Create at Rad_Region the weather effect Blue Fog
              • Set Rad_WeatherEffect[Rad_WeatherInteger] = (Last created weather effect)
              • Set Rad_WeatherInteger = (Rad_WeatherInteger + 1)
              • Set Rad_Region = (Region centered at Rad_CasterPosition with size (((Cos(75.00)) x (2.00 x Rad_Radius)), ((Sin(75.00)) x (2.00 x Rad_Radius))))
              • Environment - Create at Rad_Region the weather effect Blue Fog
              • Set Rad_WeatherEffect[Rad_WeatherInteger] = (Last created weather effect)
              • Set Rad_WeatherInteger = (Rad_WeatherInteger + 1)
              • Custom script: call RemoveLocation(udg_Rad_CasterPosition)
            • Else - Actions
 
Status
Not open for further replies.
Top