• 🏆 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!

[Trigger] Help me fix this

Status
Not open for further replies.
Level 2
Joined
May 20, 2011
Messages
15
Could anyone help me which part of this trigger that cause lag?

  • Naga Spawn
    • Events
      • Time - Every 90.00 seconds of game time
    • Conditions
      • (Temple of Tides 0053 <gen> is alive) Equal to True
    • Actions
      • Set Naga_Group[2] = (Units owned by Player 12 (Brown) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A Hero) Equal to False)))
      • Unit Group - Pick every unit in Naga_Group[2] and do (Unit - Remove (Picked unit) from the game)
      • Set Naga_Int[1] = (Random integer number between 1 and 2)
      • Set Naga_Int[2] = (Random integer number between 1 and 4)
      • Set Naga_Point[1] = (Center of Naga Spawn <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Naga_Int[1] Equal to 1
        • Then - Actions
          • Unit - Create 5 Mur'gul Reaver for Player 12 (Brown) at Naga_Point[1] facing Default building facing degrees
          • Unit - Create 3 Naga Myrmidon for Player 12 (Brown) at Naga_Point[1] facing Default building facing degrees
          • Unit - Create 2 Naga Royal Guard for Player 12 (Brown) at Naga_Point[1] facing Default building facing degrees
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Naga_Int[1] Equal to 2
        • Then - Actions
          • Unit - Create 3 Naga Siren for Player 12 (Brown) at Naga_Point[1] facing Default building facing degrees
          • Unit - Create 4 Snap Dragon for Player 12 (Brown) at Naga_Point[1] facing Default building facing degrees
          • Unit - Create 2 Dragon Turtle for Player 12 (Brown) at Naga_Point[1] facing Default building facing degrees
          • Unit - Create 1 Ancient Hydra for Player 12 (Brown) at Naga_Point[1] facing Default building facing degrees
        • Else - Actions
      • Set Naga_Group[1] = (Units in Naga Spawn <gen> owned by Player 12 (Brown))
      • If (Naga_Int[2] Equal to 1) then do (Set Naga_Point[2] = (Center of Human <gen>)) else do (Do nothing)
      • If (Naga_Int[2] Equal to 2) then do (Set Naga_Point[2] = (Center of Orc <gen>)) else do (Do nothing)
      • If (Naga_Int[2] Equal to 3) then do (Set Naga_Point[2] = (Center of Undead <gen>)) else do (Do nothing)
      • If (Naga_Int[2] Equal to 4) then do (Set Naga_Point[2] = (Center of Night Elf <gen>)) else do (Do nothing)
      • Unit Group - Pick every unit in Naga_Group[1] and do (Unit - Order (Picked unit) to Attack-Move To Naga_Point[2])
      • Custom script: call RemoveLocation(udg_Naga_Point[1])
      • Custom script: call RemoveLocation(udg_Naga_Point[2])
      • Custom script: call DestroyGroup(udg_Naga_Group[1])
      • Custom script: call DestroyGroup(udg_Naga_Group[2])
Please help me, i'm still a noob
 
Level 2
Joined
May 20, 2011
Messages
15
How about this
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
      • Set Weather_Effect[1] = (Last created weather effect)
      • Environment - Create at (Playable map area) the weather effect Rays Of Moonlight
      • Set Weather_Effect[2] = (Last created weather effect)
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Tree Resurect <gen> the event (Destructible - (Picked destructible) dies)
  • Weather
    • Events
      • Game - The in-game time of day becomes Equal to 6.01
      • Game - The in-game time of day becomes Equal to 18.01
    • Conditions
    • Actions
      • Environment - Turn Weather_Effect[3] Off
      • Set Weather_Int = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Weather_Int Equal to 2
        • Then - Actions
          • Environment - Turn Weather_Effect[1] On
          • Set Weather_Effect[3] = Weather_Effect[1]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Weather_Int Equal to 3
        • Then - Actions
          • Environment - Turn Weather_Effect[2] On
          • Set Weather_Effect[3] = Weather_Effect[2]
        • Else - Actions
  • Tree Resurect
    • Events
    • Conditions
    • Actions
      • Wait 2.00 seconds
      • Destructible - Resurrect (Dying destructible) with (Max life of (Dying destructible)) life and Show birth animation
When the in-game time reach three days it starting to be lag, and getting worse as time passed by
Is anything wrong with those trigger?
anyway thanks for your help :thumbs_up:
 
Level 2
Joined
May 20, 2011
Messages
15
It work, even the tree die together it still resurrect together after 2 seconds
but i don't know if it could cause lag
 
Status
Not open for further replies.
Top