• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Citizen movement

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
I've made a triggered 'AI' that makes the people in the city I made move around. These citizens are by foot and by car and both have triggers. The problem is: Something causes the game to freeze after just a second. I'm sure it's these triggers, since I only had those triggers when I tested it and when I turn them off, there's no problem anywhere. These are the triggers I use:

  • Pre placed citizens
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempPoint = (Center of Car exit 02 <gen>)
      • Unit - Order Car 1 0007 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car exit 01 <gen>)
      • Unit - Order Car 3 0014 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car exit 02 <gen>)
      • Unit - Order Car 2 0013 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car turn 01 <gen>)
      • Unit - Order Car 1 0008 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car turn 02 <gen>)
      • Unit - Order Car 2 0006 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car turn 02 <gen>)
      • Unit - Order Car 1 0009 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car turn 06 <gen>)
      • Unit - Order Car 3 0005 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car turn 05 <gen>)
      • Unit - Order Car 3 0015 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car exit 04 <gen>)
      • Unit - Order Car 1 0004 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car exit 04 <gen>)
      • Unit - Order Car 2 0011 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car exit 03 <gen>)
      • Unit - Order Car 3 0016 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car exit 03 <gen>)
      • Unit - Order Car 1 0010 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Car exit 03 <gen>)
      • Unit - Order Car 2 0012 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 03 <gen>)
      • Unit - Order NewVillager 3 0050 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 01 <gen>)
      • Unit - Order NewVillager 1 0017 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 03 <gen>)
      • Unit - Order NewVillager 2 0041 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 01 <gen>)
      • Unit - Order NewVillager 3 0048 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 03 <gen>)
      • Unit - Order NewVillager 1 0018 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 01 <gen>)
      • Unit - Order NewVillager 2 0042 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 03 <gen>)
      • Unit - Order NewVillager 3 0046 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 01 <gen>)
      • Unit - Order NewVillager 2 0043 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 03 <gen>)
      • Unit - Order NewVillager 1 0020 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
      • Unit - Order NewVillager 2 0044 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 04 <gen>)
      • Unit - Order NewVillager 3 0045 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
      • Unit - Order NewVillager 3 0045 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 04 <gen>)
      • Unit - Order NewVillager 3 0047 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
      • Unit - Order NewVillager 1 0021 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 02 <gen>)
      • Unit - Order NewVillager 3 0049 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 01 <gen>)
      • Unit - Order NewVillager 1 0022 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 01 <gen>)
      • Unit - Order NewVillager 2 0040 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 01 <gen>)
      • Unit - Order NewVillager 3 0051 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 03 <gen>)
      • Unit - Order NewVillager 1 0024 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 01 <gen>)
      • Unit - Order NewVillager 3 0053 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 03 <gen>)
      • Unit - Order NewVillager 2 0038 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 01 <gen>)
      • Unit - Order NewVillager 1 0026 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
      • Unit - Order NewVillager 3 0055 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 04 <gen>)
      • Unit - Order NewVillager 3 0054 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
      • Unit - Order NewVillager 1 0025 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 04 <gen>)
      • Unit - Order NewVillager 2 0039 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
      • Unit - Order NewVillager 3 0052 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 04 <gen>)
      • Unit - Order NewVillager 1 0023 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
      • Unit - Order NewVillager 3 0057 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 05 <gen>)
      • Unit - Order NewVillager 1 0028 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 03 <gen>)
      • Unit - Order NewVillager 3 0056 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 04 <gen>)
      • Unit - Order NewVillager 2 0036 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 07 <gen>)
      • Unit - Order NewVillager 1 0027 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 04 <gen>)
      • Unit - Order NewVillager 3 0061 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 07 <gen>)
      • Unit - Order NewVillager 2 0035 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 04 <gen>)
      • Unit - Order NewVillager 3 0063 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 07 <gen>)
      • Unit - Order NewVillager 1 0031 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir turn 04 <gen>)
      • Unit - Order NewVillager 3 0064 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 07 <gen>)
      • Unit - Order NewVillager 2 0033 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 06 <gen>)
      • Unit - Order NewVillager 3 0065 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 08 <gen>)
      • Unit - Order NewVillager 1 0032 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 06 <gen>)
      • Unit - Order NewVillager 2 0034 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 08 <gen>)
      • Unit - Order NewVillager 3 0062 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 06 <gen>)
      • Unit - Order NewVillager 1 0030 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 08 <gen>)
      • Unit - Order NewVillager 3 0060 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 06 <gen>)
      • Unit - Order NewVillager 3 0059 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 08 <gen>)
      • Unit - Order NewVillager 1 0029 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 06 <gen>)
      • Unit - Order NewVillager 2 0037 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Trottoir 08 <gen>)
      • Unit - Order NewVillager 3 0058 <gen> to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Car spawn
    • Events
      • Unit - A unit enters Car exit 01 <gen>
      • Unit - A unit enters Car exit 02 <gen>
      • Unit - A unit enters Car exit 03 <gen>
      • Unit - A unit enters Car exit 04 <gen>
      • Unit - A unit enters Car exit 05 <gen>
      • Unit - A unit enters Car exit 06 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Set TempCPoint = (Center of Car spawn 01 <gen>)
      • Set TempPoint = (Center of Car exit 02 <gen>)
      • Set RANDOM = (Random integer number between 1 and 4)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RANDOM Equal to 1
        • Then - Actions
          • Set RANDOM = (Random integer number between 1 and 3)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RANDOM Equal to 1
            • Then - Actions
              • Unit - Create 1 Car 1 for Player 12 (Brown) at TempCPoint facing TempPoint
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RANDOM Equal to 2
                • Then - Actions
                  • Unit - Create 1 Car 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 3
                    • Then - Actions
                      • Unit - Create 1 Car 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                      • Set RANDOM = (Random integer number between 1 and 12)
                      • Unit - Change color of (Last created unit) to (Color of (Player(RANDOM)))
                    • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RANDOM Equal to 2
            • Then - Actions
              • Set TempCPoint = (Center of Car spawn 02 <gen>)
              • Set TempPoint = (Center of Car turn 01 <gen>)
              • Set RANDOM = (Random integer number between 1 and 3)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RANDOM Equal to 1
                • Then - Actions
                  • Unit - Create 1 Car 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 2
                    • Then - Actions
                      • Unit - Create 1 Car 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RANDOM Equal to 3
                        • Then - Actions
                          • Unit - Create 1 Car 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                          • Set RANDOM = (Random integer number between 1 and 12)
                          • Unit - Change color of (Last created unit) to (Color of (Player(RANDOM)))
                        • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RANDOM Equal to 3
                • Then - Actions
                  • Set TempCPoint = (Center of Car spawn 03 <gen>)
                  • Set TempPoint = (Center of Car turn 05 <gen>)
                  • Set RANDOM = (Random integer number between 1 and 3)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 1
                    • Then - Actions
                      • Unit - Create 1 Car 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RANDOM Equal to 2
                        • Then - Actions
                          • Unit - Create 1 Car 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RANDOM Equal to 3
                            • Then - Actions
                              • Unit - Create 1 Car 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                              • Set RANDOM = (Random integer number between 1 and 12)
                              • Unit - Change color of (Last created unit) to (Color of (Player(RANDOM)))
                            • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 4
                    • Then - Actions
                      • Set TempCPoint = (Center of Car spawn 04 <gen>)
                      • Set TempPoint = (Center of Car exit 03 <gen>)
                      • Set RANDOM = (Random integer number between 1 and 3)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RANDOM Equal to 1
                        • Then - Actions
                          • Unit - Create 1 Car 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RANDOM Equal to 2
                            • Then - Actions
                              • Unit - Create 1 Car 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RANDOM Equal to 3
                                • Then - Actions
                                  • Unit - Create 1 Car 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                                  • Set RANDOM = (Random integer number between 1 and 12)
                                  • Unit - Change color of (Last created unit) to (Color of (Player(RANDOM)))
                                • Else - Actions
                    • Else - Actions
      • Unit - Order (Last created unit) to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempCPoint)
      • Unit - Remove (Entering unit) from the game
  • Car turn 01
    • Events
      • Unit - A unit enters Car turn 01 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Set TempPoint = (Center of Car turn 06 <gen>)
      • Unit - Order (Entering unit) to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Citizen spawn
    • Events
      • Unit - A unit enters Trottoir 01 <gen>
      • Unit - A unit enters Trottoir 02 <gen>
      • Unit - A unit enters Trottoir 03 <gen>
      • Unit - A unit enters Trottoir 04 <gen>
      • Unit - A unit enters Trottoir 05 <gen>
      • Unit - A unit enters Trottoir 06 <gen>
      • Unit - A unit enters Trottoir 07 <gen>
      • Unit - A unit enters Trottoir 08 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Set RANDOM = (Random integer number between 1 and 8)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RANDOM Equal to 1
        • Then - Actions
          • Set TempCPoint = (Center of Trottoir 01 <gen>)
          • Set TempPoint = (Center of Trottoir 03 <gen>)
          • Set RANDOM = (Random integer number between 1 and 3)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RANDOM Equal to 1
            • Then - Actions
              • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RANDOM Equal to 2
                • Then - Actions
                  • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 3
                    • Then - Actions
                      • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                    • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RANDOM Equal to 2
            • Then - Actions
              • Set TempCPoint = (Center of Trottoir 02 <gen>)
              • Set TempPoint = (Center of Trottoir turn 01 <gen>)
              • Set RANDOM = (Random integer number between 1 and 3)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RANDOM Equal to 1
                • Then - Actions
                  • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 2
                    • Then - Actions
                      • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RANDOM Equal to 3
                        • Then - Actions
                          • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                        • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RANDOM Equal to 3
                • Then - Actions
                  • Set TempCPoint = (Center of Trottoir 03 <gen>)
                  • Set TempPoint = (Center of Trottoir 01 <gen>)
                  • Set RANDOM = (Random integer number between 1 and 3)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 1
                    • Then - Actions
                      • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RANDOM Equal to 2
                        • Then - Actions
                          • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RANDOM Equal to 3
                            • Then - Actions
                              • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                            • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RANDOM Equal to 4
                    • Then - Actions
                      • Set TempCPoint = (Center of Trottoir 04 <gen>)
                      • Set TempPoint = (Center of Trottoir turn 02 <gen>)
                      • Set RANDOM = (Random integer number between 1 and 3)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RANDOM Equal to 1
                        • Then - Actions
                          • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RANDOM Equal to 2
                            • Then - Actions
                              • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RANDOM Equal to 3
                                • Then - Actions
                                  • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                                • Else - Actions
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RANDOM Equal to 5
                        • Then - Actions
                          • Set TempCPoint = (Center of Trottoir 05 <gen>)
                          • Set TempPoint = (Center of Trottoir turn 03 <gen>)
                          • Set RANDOM = (Random integer number between 1 and 3)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RANDOM Equal to 1
                            • Then - Actions
                              • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RANDOM Equal to 2
                                • Then - Actions
                                  • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • RANDOM Equal to 3
                                    • Then - Actions
                                      • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                                    • Else - Actions
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RANDOM Equal to 6
                            • Then - Actions
                              • Set TempCPoint = (Center of Trottoir 06 <gen>)
                              • Set TempPoint = (Center of Trottoir 08 <gen>)
                              • Set RANDOM = (Random integer number between 1 and 3)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RANDOM Equal to 1
                                • Then - Actions
                                  • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • RANDOM Equal to 2
                                    • Then - Actions
                                      • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • RANDOM Equal to 3
                                        • Then - Actions
                                          • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                                        • Else - Actions
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RANDOM Equal to 7
                                • Then - Actions
                                  • Set TempCPoint = (Center of Trottoir 07 <gen>)
                                  • Set TempPoint = (Center of Trottoir turn 04 <gen>)
                                  • Set RANDOM = (Random integer number between 1 and 3)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • RANDOM Equal to 1
                                    • Then - Actions
                                      • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • RANDOM Equal to 2
                                        • Then - Actions
                                          • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • RANDOM Equal to 3
                                            • Then - Actions
                                              • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                                            • Else - Actions
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • RANDOM Equal to 8
                                    • Then - Actions
                                      • Set TempCPoint = (Center of Trottoir 08 <gen>)
                                      • Set TempPoint = (Center of Trottoir 06 <gen>)
                                      • Set RANDOM = (Random integer number between 1 and 3)
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • RANDOM Equal to 1
                                        • Then - Actions
                                          • Unit - Create 1 NewVillager 1 for Player 12 (Brown) at TempCPoint facing TempPoint
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • RANDOM Equal to 2
                                            • Then - Actions
                                              • Unit - Create 1 NewVillager 2 for Player 12 (Brown) at TempCPoint facing TempPoint
                                            • Else - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • RANDOM Equal to 3
                                                • Then - Actions
                                                  • Unit - Create 1 NewVillager 3 for Player 12 (Brown) at TempCPoint facing TempPoint
                                                • Else - Actions
                                    • Else - Actions
      • Unit - Order (Last created unit) to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempCPoint)
      • Unit - Remove (Entering unit) from the game
  • Citizen Check 11
    • Events
      • Unit - A unit enters Trottoir Check 11 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Unit - Set the custom value of (Entering unit) to 1
  • Citizen Check 12
    • Events
      • Unit - A unit enters Trottoir Check 12 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Unit - Set the custom value of (Entering unit) to 2
  • Citizen turn 01
    • Events
      • Unit - A unit enters Trottoir turn 01 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Entering unit)) Equal to 1
        • Then - Actions
          • Set TempPoint = (Center of Trottoir turn 03 <gen>)
        • Else - Actions
          • Set TempPoint = (Center of Trottoir 02 <gen>)
      • Unit - Order (Entering unit) to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)


The number behind the HIDDEN title "(#x)" indicates how many of that/those kind of triggers are made. The "Citizen Check" trigger just checks from which direction the citizens come, so when they enter a corner region, they move to the next point instead of turning around. (Would be kind of weird if people could only walk 1 way on the trottoir :xxd:)

Anyone who can help me solve this problem or helps will be given +rep ofcourse.



EDIT: The problem seems to be in the 'Citizen spawn' trigger. It's weird, because the 'Car spawn' trigger is made the same way (with different data ofcourse) and doesn't cause any trouble.
 
Last edited:
Level 18
Joined
Aug 23, 2008
Messages
2,319
I just tried and doesn't work. I did however found out that the 'pre placed citizens' trigger alone doesn't cause any problems. I actually thought that since it's the biggest trigger that does a lot at the same time, that might be the cause, but it's not.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
After a bunch of tests, it seems that the problem lies with the 'Citizen spawn' trigger. The 'Car spawn' trigger doesn't cause any problems at all, which is strange, because they both do the same.

Can anybody think of a reason/solution for this problem?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,257
1. One of the triggers causes a massive load in data (like the creation ones) which results in lag as it is loaded.

2. There is a bug that results in some units entering an infinate loop temporly due to entering and leaving regions.

Eithor one of those 2 could be the problem with the data you gave.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
I've tested it and the problem only occurs when the Citizen Spawn trigger is enabled. Strangely enough, you can see that the Car Spawn trigger is made just like the Citizen Spawn trigger (just different data), and that one doesn't cause any trouble. Do you see anything in that trigger that might lead to something?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,257
Does it lag once? If so it is unavoidable initial load lag.

If it lags perodically, eithor your trigger is too complex and demanding at certain times, or else you get into an infinate loop temporarly which logically results in max CPU usage and so lag. How it can get into a tempory infinate loop is if the event of another trigger (or the same trigger) is triggered by something that trigger is doing.
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Your triger is definitly entering infinite loops coz each time u creat a unit on (P1) and (P1) is what the next unit will be created so it's technicaly the created unit is an entering unit so it will create infinite units that it will freeze the game !!!!!!!!! INFINITE LOOPS !!
BTW THE PROBLEM Is in CITIZEN SPAWN !!!!!!
 
Last edited:
Status
Not open for further replies.
Top