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

Spawn unit trigger leak

Status
Not open for further replies.
Level 6
Joined
Jul 12, 2017
Messages
139
I have been wondering. If I wanna spawn multiple units from 1 trigger, will these leak?

Trigger 1

  • Testtt
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet Point1 = (Center of (Playable map area))
      • Unit - Create 1 Footman for Player 1 (Red) at Point1 facing Default building facing degrees
      • Unit - Create 1 Rifleman for Player 1 (Red) at Point1 facing Default building facing degrees
      • Unit - Create 1 Knight for Player 1 (Red) at Point1 facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point1)
Trigger 2

  • Testtt
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet Point1 = (Center of (Playable map area))
      • Unit - Create 10 Footman for Player 1 (Red) at Point1 facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point1)
Trigger 3

  • Testtt
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set VariableSet Point1 = (Center of (Playable map area))
          • Unit - Create 1 Footman for Player 1 (Red) at Point1 facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_Point1)
What is the best trigger for spawning multiple units at once? I feel like my map lag more during late game (1 hour passed). I usually use trigger 1 to spawn multiple but I doubt it would work fine?

Any recommend trigger?
 
Level 6
Joined
Jul 12, 2017
Messages
139
So this one is fine right? Also I wanna ask about summon water elemental ability, my map uses it a lot. If I spawn a lot of unit from it, will it leak or do something that cause the lag as well?

  • Wave 07 Event Spawn Big Wave 3
    • Events
      • Time - Wave7_Event_BigWave3 expires
    • Conditions
    • Actions
      • Set VariableSet Point1 = (Center of Region 471 <gen>)
      • Set VariableSet Point2 = (Center of Region 199 <gen>)
      • Set VariableSet Point3 = (Center of Region 200 <gen>)
      • Unit - Create 2 Wendigo Shaman (Wave 7 Event) for Player 11 (Dark Green) at Point1 facing Default building facing degrees
      • Unit - Create 2 Nerubian Queen (Wave 7 Event) for Player 11 (Dark Green) at Point1 facing Default building facing degrees
      • Unit - Create 2 Wendigo Shaman (Wave 7 Event) for Player 11 (Dark Green) at Point2 facing Default building facing degrees
      • Unit - Create 2 Nerubian Queen (Wave 7 Event) for Player 11 (Dark Green) at Point2 facing Default building facing degrees
      • Unit - Create 2 Wendigo Shaman (Wave 7 Event) for Player 11 (Dark Green) at Point3 facing Default building facing degrees
      • Unit - Create 2 Nerubian Queen (Wave 7 Event) for Player 11 (Dark Green) at Point3 facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point1)
      • Custom script: call RemoveLocation(udg_Point2)
      • Custom script: call RemoveLocation(udg_Point3)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
 
Status
Not open for further replies.
Top