• 🏆 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] Triggers crashing the game?

Status
Not open for further replies.
Level 3
Joined
Apr 30, 2011
Messages
22
Hello, I do not know if it's the right place to ask, but it seems that some of my triggers are making my game crash, had no real trouble before 1.29.


Spawns go like this
  • Tier 0 Turn on
    • Events
      • Time - Elapsed game time is 160.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start spawnTimerTier0 as a Repeating timer that will expire in 30.00 seconds
      • Game - Display to (All players) for 15.00 seconds the text: You will receive Go...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerN Less than or equal to 2
        • Then - Actions
          • Trigger - Turn on Tier 0 Spawn 2P <gen>
          • Trigger - Turn on Tier 1 Spawn 2P <gen>
          • Trigger - Turn on Tier 2 Spawn 2P <gen>
          • Trigger - Turn on Tier 2 SpawnNobuilder 2P <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerN Less than or equal to 5
            • Then - Actions
              • Trigger - Turn on Tier 0 Spawn 2P <gen>
              • Trigger - Turn on Tier 1 Spawn 2P <gen>
              • Trigger - Turn on Tier 2 Spawn 2P <gen>
              • Trigger - Turn on Tier 2 SpawnNobuilder 5P <gen>
            • Else - Actions
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Tier 0 Spawn 2P
    • Events
      • Time - spawnTimerTier0 expires
    • Conditions
    • Actions
      • Set tempPoint[5] = (Random point in Zombie spawn <gen>)
      • Set tempPoint[6] = (Random point in Zombie spawn <gen>)
      • Set tempPoint[7] = (Random point in Zombie spawn <gen>)
      • Set tempPoint[8] = (Random point in Zombie spawn <gen>)
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Zombie for Player 9 (Gray) at tempPoint[5] facing Default building facing degrees
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Zombie for Player 10 (Light Blue) at tempPoint[6] facing Default building facing degrees
          • Unit - Create 1 Zombie for Player 11 (Dark Green) at tempPoint[7] facing Default building facing degrees
          • Unit - Create 1 Zombie for Player 12 (Brown) at tempPoint[8] facing Default building facing degrees
      • Set tempGroupGR = (Units in (Playable map area) owned by Player 9 (Gray))
      • Set tempGroupLB = (Units in (Playable map area) owned by Player 10 (Light Blue))
      • Set tempGroupDG = (Units in (Playable map area) owned by Player 11 (Dark Green))
      • Set tempGroupBR = (Units in (Playable map area) owned by Player 12 (Brown))
      • Set tempPoint[1] = (Position of (Random unit from Player_Hero))
      • Set tempPoint[2] = (Position of (Random unit from Player_Hero))
      • Set tempPoint[3] = (Position of (Random unit from Player_Hero))
      • Set tempPoint[4] = (Position of (Random unit from Player_Hero))
      • Unit Group - Pick every unit in tempGroupGR and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[1]
      • Unit Group - Pick every unit in tempGroupLB and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[2]
      • Unit Group - Pick every unit in tempGroupDG and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[3]
      • Unit Group - Pick every unit in tempGroupBR and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[4]
      • Custom script: call RemoveLocation(udg_tempPoint[5])
      • Custom script: call RemoveLocation(udg_tempPoint[6])
      • Custom script: call RemoveLocation(udg_tempPoint[7])
      • Custom script: call RemoveLocation(udg_tempPoint[8])
      • Custom script: call RemoveLocation(udg_tempPoint[1])
      • Custom script: call RemoveLocation(udg_tempPoint[2])
      • Custom script: call RemoveLocation(udg_tempPoint[3])
      • Custom script: call RemoveLocation(udg_tempPoint[4])
      • Custom script: call DestroyGroup(udg_tempGroupGR)
      • Custom script: call DestroyGroup(udg_tempGroupLB)
      • Custom script: call DestroyGroup(udg_tempGroupDG)
      • Custom script: call DestroyGroup(udg_tempGroupBR)

Or like this
  • Tier 1 Turn on
    • Events
      • Time - Elapsed game time is 205.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start spawnTimerTier1 as a Repeating timer that will expire in 55.00 seconds
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Tier 1 Spawn 2P
    • Events
      • Time - spawnTimerTier1 expires
    • Conditions
    • Actions
      • Set tempPoint[5] = (Random point in Zombie spawn <gen>)
      • Set tempPoint[6] = (Random point in Zombie spawn <gen>)
      • Set tempPoint[7] = (Random point in Zombie spawn <gen>)
      • Set tempPoint[8] = (Random point in Zombie spawn <gen>)
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Mummy for Player 9 (Gray) at tempPoint[5] facing Default building facing degrees
          • Unit - Create 1 Skeleton Archer for Player 10 (Light Blue) at tempPoint[6] facing Default building facing degrees
          • Unit - Create 1 Banshee for Player 12 (Brown) at tempPoint[8] facing Default building facing degrees
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Ghoul for Player 11 (Dark Green) at tempPoint[5] facing Default building facing degrees
      • Set tempGroupGR = (Units in (Playable map area) owned by Player 9 (Gray))
      • Set tempGroupLB = (Units in (Playable map area) owned by Player 10 (Light Blue))
      • Set tempGroupDG = (Units in (Playable map area) owned by Player 11 (Dark Green))
      • Set tempGroupBR = (Units in (Playable map area) owned by Player 12 (Brown))
      • Set tempPoint[1] = (Position of (Random unit from Player_Hero))
      • Set tempPoint[2] = (Position of (Random unit from Player_Hero))
      • Set tempPoint[3] = (Position of (Random unit from Player_Hero))
      • Set tempPoint[4] = (Position of (Random unit from Player_Hero))
      • Unit Group - Pick every unit in tempGroupGR and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[1]
      • Unit Group - Pick every unit in tempGroupLB and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[2]
      • Unit Group - Pick every unit in tempGroupDG and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[3]
      • Unit Group - Pick every unit in tempGroupBR and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To tempPoint[4]
      • Custom script: call RemoveLocation(udg_tempPoint[5])
      • Custom script: call RemoveLocation(udg_tempPoint[6])
      • Custom script: call RemoveLocation(udg_tempPoint[7])
      • Custom script: call RemoveLocation(udg_tempPoint[8])
      • Custom script: call RemoveLocation(udg_tempPoint[1])
      • Custom script: call RemoveLocation(udg_tempPoint[2])
      • Custom script: call RemoveLocation(udg_tempPoint[3])
      • Custom script: call RemoveLocation(udg_tempPoint[4])
      • Custom script: call DestroyGroup(udg_tempGroupGR)
      • Custom script: call DestroyGroup(udg_tempGroupLB)
      • Custom script: call DestroyGroup(udg_tempGroupDG)
      • Custom script: call DestroyGroup(udg_tempGroupBR)

There is 2 other stages that go pretty much like theses, but it starts to crash before those.

The game starts has normal and then about 5 min in it starts to crash/fps drop/ lag

there is about 20 units in the map at that time, I dont really know why, since I used to get around 200 ish units before they started to become less respositive. I know that the more there is computer controlling separate unit, the less they stagger, which is why 1.29 is nice for the extra 12 players slot.

I can post the map if needed(maybe its something else, but it crashes when the zombie spawns mostly, I checked with full map view), it is in alpha stage developpement, and ressources arent credited yet.

Thanks guys!
 
Level 13
Joined
Oct 12, 2016
Messages
769
For each (Integer A) from 1 to 1, do (Actions)
This part confuses me. Basically, you don't need the loop here if it's for 1 instance.

Can zombies go everywhere players can go? Like, is the pathing OK?
Regarding problems, I've noticed problems lately with countdown timers after patch 1.29. It may contribute to this, since you use them.
Try the same thing, but with a periodic event instead of a countdown timer. See if that fixes it. I don't see leaks.
 
Status
Not open for further replies.
Top