Building

Vacko

New Member
Reaction score
0
Hay! ^^

I want first every class should have difference buildings so I get this trigger.
Trigger:
  • Base
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of (Player((Integer A)))) Equal to Human
            • Then - Actions
              • Set BuildNew[(Integer A)] = Farm
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of (Player((Integer A)))) Equal to Orc
                • Then - Actions
                  • Set BuildNew[(Integer A)] = Orc Burrow
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Race of (Player((Integer A)))) Equal to Undead
                    • Then - Actions
                      • Set BuildNew[(Integer A)] = Ziggurat
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Race of (Player((Integer A)))) Equal to Night Elf
                        • Then - Actions
                          • Set BuildNew[(Integer A)] = Moon Well
                        • Else - Actions


then I want them placed where I want them too. But they never appear, wonder which trigger is wrong, here is the other one,

Trigger:
  • Set
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempPoint = ((Player((Integer A))) start location)
      • Unit - Create 1 BuildNew[(Integer A)] for (Player((Integer A))) at tempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_tempPoint)


Variable;
tempPoint - Point
BuildNew - Unit-type [X] array
 

jomik

New Member
Reaction score
17
The Set is probably run before the Base, so it's creating No units for everyone :p
Also you need a loop in the Set :)
But it's smarter just to remove the BuildNew variable, and instead use the stuff you have in the Set to make it create the building instead of setting a variable, unless you need to use the variable later?
 

Vacko

New Member
Reaction score
0
I made it like this xD wow I have learned a lot from you Jomik xD
But I think I have done something wrong >.< it doesn't work...

Trigger:
  • Set Up
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempPoint = ((Player((Integer A))) start location)
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of (Player((Integer A)))) Equal to Human
            • Then - Actions
              • Set Unit2Spawn[(Integer A)] = Footman
              • Unit - Create 1 Farm for (Player((Integer A))) at tempPoint facing Default building facing degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of (Player((Integer A)))) Equal to Orc
                • Then - Actions
                  • Set Unit2Spawn[(Integer A)] = Grunt
                  • Unit - Create 1 Orc Burrow for (Player((Integer A))) at tempPoint facing Default building facing degrees
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Race of (Player((Integer A)))) Equal to Undead
                    • Then - Actions
                      • Set Unit2Spawn[(Integer A)] = Ghoul
                      • Unit - Create 1 Ziggurat for (Player((Integer A))) at tempPoint facing Default building facing degrees
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Race of (Player((Integer A)))) Equal to Night Elf
                        • Then - Actions
                          • Set Unit2Spawn[(Integer A)] = Archer
                          • Unit - Create 1 Moon Well for (Player((Integer A))) at tempPoint facing Default building facing degrees
                        • Else - Actions
      • Custom script: call RemoveLocation(udg_tempPoint)
 

sLsIDK

New Member
Reaction score
13
Trigger:
  • Set Up
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set tempPoint = ((Player((Integer A))) start location)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of (Player((Integer A)))) Equal to Human
            • Then - Actions
              • Set Unit2Spawn[(Integer A)] = Footman
              • Unit - Create 1 Farm for (Player((Integer A))) at tempPoint facing Default building facing degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of (Player((Integer A)))) Equal to Orc
                • Then - Actions
                  • Set Unit2Spawn[(Integer A)] = Grunt
                  • Unit - Create 1 Orc Burrow for (Player((Integer A))) at tempPoint facing Default building facing degrees
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Race of (Player((Integer A)))) Equal to Undead
                    • Then - Actions
                      • Set Unit2Spawn[(Integer A)] = Ghoul
                      • Unit - Create 1 Ziggurat for (Player((Integer A))) at tempPoint facing Default building facing degrees
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Race of (Player((Integer A)))) Equal to Night Elf
                        • Then - Actions
                          • Set Unit2Spawn[(Integer A)] = Archer
                          • Unit - Create 1 Moon Well for (Player((Integer A))) at tempPoint facing Default building facing degrees
                        • Else - Actions
          • Custom script: call RemoveLocation(udg_tempPoint)


Changes made:
set tempPoint and custom script was moved into the for loop (and only the for loop)
 

Vacko

New Member
Reaction score
0
YaY! I got it too work now ^^ shall I explain it or what? xD so if anyone else want it xD
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top