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

Help please! Why does my advanced spawn system not work!

Status
Not open for further replies.
Level 11
Joined
Nov 1, 2008
Messages
828
Hey, i have had enough with this system after 3 hours trying to figure out why it gives me a fatal error when it reaches Zombies_Spawn[4] Equal to False which is at the end of trigger Level 1.

Here is the system! Help will be gladly aprecieated as i am struggling! :goblin_cry:

  • Level 1
    • Events
      • Time - Every 0.70 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Zombies_Random_Spawn Equal to 1
          • Zombies_Spawn[1] Equal to False
        • Then - Actions
          • Trigger - Run Level 1 Random 1 <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Zombies_Random_Spawn Equal to 2
              • Zombies_Spawn[2] Equal to False
            • Then - Actions
              • Trigger - Run Level 1 Random 2 <gen> (checking conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Zombies_Random_Spawn Equal to 3
                  • Zombies_Spawn[3] Equal to False
                • Then - Actions
                  • Trigger - Run Level 1 Random 3 <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Zombies_Random_Spawn Equal to 4
                      • Zombies_Spawn[4] Equal to False
                    • Then - Actions
                      • Trigger - Run Level 1 Random 4 <gen> (checking conditions)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Zombies_Spawn[5] Equal to False
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Level_End_Fix Equal to True
                            • Then - Actions
                              • Set Number_Of_Zombies[1] = 0
                              • Set Number_Of_Zombies[2] = 0
                              • Set Number_Of_Zombies[3] = 0
                              • Set Number_Of_Zombies[4] = 0
                              • Set Level_End_Fix = False
                            • Else - Actions
                          • Set Zombies_Random_Spawn_Final = (Random integer number between 1 and 4)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Zombies_Random_Spawn_Final Equal to 1
                            • Then - Actions
                              • Trigger - Run Level 1 Random 1 <gen> (checking conditions)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Zombies_Random_Spawn_Final Equal to 2
                                • Then - Actions
                                  • Trigger - Run Level 1 Random 2 <gen> (checking conditions)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Zombies_Random_Spawn_Final Equal to 3
                                    • Then - Actions
                                      • Trigger - Run Level 1 Random 3 <gen> (checking conditions)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • Zombies_Random_Spawn_Final Equal to 4
                                        • Then - Actions
                                          • Trigger - Run Level 1 Random 4 <gen> (checking conditions)
                                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Level_End_Real Equal to True
                            • Then - Actions
                              • Set Level_End_Real = False
                              • Trigger - Turn on Level 1 Finnish <gen>
                              • Trigger - Turn off (This trigger)
                            • Else - Actions
                        • Else - Actions
                          • Set Zombies_Random_Spawn = (Random integer number between 1 and 4)
                          • Trigger - Run Level 1 <gen> (checking conditions)
These are the spawns, there are 4 of them, i'm only going to post one since they are all the same. :goblin_yeah:

  • Level 1 Random 1
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit - Create 1 Zombie for Player 12 (Brown) at (Random point in Spawn 1 <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to group_zombies
          • If (Level_End Equal to True) then do (Skip remaining actions) else do (Do nothing)
          • Set Number_Of_Zombies[1] = (Number_Of_Zombies[1] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Number_Of_Zombies[1] Equal to 10
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Zombies_Final Equal to 4
                • Then - Actions
                  • Set Level_End = True
                  • Set Zombies_Spawn[5] = False
                • Else - Actions
              • Set Zombies_Final = (Zombies_Final + 1)
              • Set Zombies_Spawn[1] = True
              • Wait (Random real number between 1.00 and 8.00) seconds
              • Set Zombies_Random_Spawn = (Random integer number between 1 and 4)
            • Else - Actions
        • Else - Actions
Thanks!
 
Last edited:
Level 11
Joined
Nov 1, 2008
Messages
828
When it gets to this point it does it once then it loops after 1 second, then it crashes the game. So everything is working perfect until this part below (the final wave). It's probably something obvuois, but i cant seem to find it! :goblin_boom:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Zombies_Spawn[5] Equal to False
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Level_End_Fix Equal to True
        • Then - Actions
          • Set Number_Of_Zombies[1] = 0
          • Set Number_Of_Zombies[2] = 0
          • Set Number_Of_Zombies[3] = 0
          • Set Number_Of_Zombies[4] = 0
          • Set Level_End_Fix = False
        • Else - Actions
      • Set Zombies_Random_Spawn_Final = (Random integer number between 1 and 4)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Zombies_Random_Spawn_Final Equal to 1
        • Then - Actions
          • Trigger - Run Level 1 Random 1 <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Zombies_Random_Spawn_Final Equal to 2
            • Then - Actions
              • Trigger - Run Level 1 Random 2 <gen> (checking conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Zombies_Random_Spawn_Final Equal to 3
                • Then - Actions
                  • Trigger - Run Level 1 Random 3 <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Zombies_Random_Spawn_Final Equal to 4
                    • Then - Actions
                      • Trigger - Run Level 1 Random 4 <gen> (checking conditions)
                    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Level_End_Real Equal to True
        • Then - Actions
          • Set Level_End_Real = False
          • Trigger - Turn on Level 1 Finnish <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
    • Else - Actions
      • Set Zombies_Random_Spawn = (Random integer number between 1 and 4)
      • Trigger - Run Level 1 <gen> (checking conditions)
 
Status
Not open for further replies.
Top