• 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] Endif? Please Help my Trigger Doesn't Work.

Status
Not open for further replies.
Level 8
Joined
Dec 26, 2006
Messages
327
  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Selling unit)) Equal to Celestial Portal
    • Actions
      • Unit - Remove (Sold unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Veledrian Sentinel
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Sold unit)) Equal to Player 1 (Red)
            • Then - Actions
              • Hero - Drop the item from slot 1 of (Selling unit)
              • Hero - Create archer and give it to (Selling unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Sold unit)) Equal to Player 2 (Blue)
                • Then - Actions
                  • Hero - Drop the item from slot 2 of (Selling unit)
                  • Hero - Create archer and give it to (Selling unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Owner of (Sold unit)) Equal to Player 3 (Teal)
                    • Then - Actions
                      • Hero - Drop the item from slot 3 of (Selling unit)
                      • Hero - Create archer and give it to (Selling unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Owner of (Sold unit)) Equal to Player 4 (Purple)
                        • Then - Actions
                          • Hero - Drop the item from slot 4 of (Selling unit)
                          • Hero - Create archer and give it to (Selling unit)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Owner of (Sold unit)) Equal to Player 5 (Yellow)
                            • Then - Actions
                              • Hero - Drop the item from slot 5 of (Selling unit)
                              • Hero - Create archer and give it to (Selling unit)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of (Triggering unit)) Equal to Ardent Cavalier
                                • Then - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Owner of (Sold unit)) Equal to Player 1 (Red)
                                    • Then - Actions
                                      • Hero - Drop the item from slot 1 of (Selling unit)
                                      • Hero - Create tank and give it to (Selling unit)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Owner of (Sold unit)) Equal to Player 2 (Blue)
                                        • Then - Actions
                                          • Hero - Drop the item from slot 2 of (Selling unit)
                                          • Hero - Create tank and give it to (Selling unit)
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • (Owner of (Sold unit)) Equal to Player 3 (Teal)
                                            • Then - Actions
                                              • Hero - Drop the item from slot 3 of (Selling unit)
                                              • Hero - Create tank and give it to (Selling unit)
                                            • Else - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • (Owner of (Sold unit)) Equal to Player 4 (Purple)
                                                • Then - Actions
                                                  • Hero - Drop the item from slot 4 of (Selling unit)
                                                  • Hero - Create tank and give it to (Selling unit)
                                                • Else - Actions
                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    • If - Conditions
                                                      • (Owner of (Sold unit)) Equal to Player 5 (Yellow)
                                                    • Then - Actions
                                                      • Hero - Drop the item from slot 5 of (Selling unit)
                                                      • Hero - Create tank and give it to (Selling unit)
                                                    • Else - Actions
                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                        • If - Conditions
                                                          • (Unit-type of (Triggering unit)) Equal to Ardent Wrath
                                                        • Then - Actions
                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            • If - Conditions
                                                              • (Owner of (Sold unit)) Equal to Player 1 (Red)
                                                            • Then - Actions
                                                              • Hero - Drop the item from slot 1 of (Selling unit)
                                                              • Hero - Create beserker and give it to (Selling unit)
                                                            • Else - Actions
                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                • If - Conditions
                                                                  • (Owner of (Sold unit)) Equal to Player 2 (Blue)
                                                                • Then - Actions
                                                                  • Hero - Drop the item from slot 2 of (Selling unit)
                                                                  • Hero - Create beserker and give it to (Selling unit)
                                                                • Else - Actions
                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    • If - Conditions
                                                                      • (Owner of (Sold unit)) Equal to Player 3 (Teal)
                                                                    • Then - Actions
                                                                      • Hero - Drop the item from slot 3 of (Selling unit)
                                                                      • Hero - Create beserker and give it to (Selling unit)
                                                                    • Else - Actions
                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                        • If - Conditions
                                                                          • (Owner of (Sold unit)) Equal to Player 4 (Purple)
                                                                        • Then - Actions
                                                                          • Hero - Drop the item from slot 4 of (Selling unit)
                                                                          • Hero - Create beserker and give it to (Selling unit)
                                                                        • Else - Actions
                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            • If - Conditions
                                                                              • (Owner of (Sold unit)) Equal to Player 5 (Yellow)
                                                                            • Then - Actions
                                                                              • Hero - Drop the item from slot 5 of (Selling unit)
                                                                              • Hero - Create beserker and give it to (Selling unit)
                                                                            • Else - Actions
                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                • If - Conditions
                                                                                  • (Unit-type of (Triggering unit)) Equal to Veledrian Ettin
                                                                                • Then - Actions
                                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                    • If - Conditions
                                                                                      • (Owner of (Sold unit)) Equal to Player 1 (Red)
                                                                                    • Then - Actions
                                                                                      • Hero - Drop the item from slot 1 of (Selling unit)
                                                                                      • Hero - Create siege and give it to (Selling unit)
                                                                                    • Else - Actions
                                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                        • If - Conditions
                                                                                          • (Owner of (Sold unit)) Equal to Player 2 (Blue)
                                                                                        • Then - Actions
                                                                                          • Hero - Drop the item from slot 2 of (Selling unit)
                                                                                          • Hero - Create siege and give it to (Selling unit)
                                                                                        • Else - Actions
                                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                            • If - Conditions
                                                                                              • (Owner of (Sold unit)) Equal to Player 3 (Teal)
                                                                                            • Then - Actions
                                                                                              • Hero - Drop the item from slot 3 of (Selling unit)
                                                                                              • Hero - Create siege and give it to (Selling unit)
                                                                                            • Else - Actions
                                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                • If - Conditions
                                                                                                  • (Owner of (Sold unit)) Equal to Player 4 (Purple)
                                                                                                • Then - Actions
                                                                                                  • Hero - Drop the item from slot 4 of (Selling unit)
                                                                                                  • Hero - Create siege and give it to (Selling unit)
                                                                                                • Else - Actions
                                                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                    • If - Conditions
                                                                                                      • (Owner of (Sold unit)) Equal to Player 5 (Yellow)
                                                                                                    • Then - Actions
                                                                                                      • Hero - Drop the item from slot 5 of (Selling unit)
                                                                                                      • Hero - Create siege and give it to (Selling unit)
                                                                                                    • Else - Actions
                                                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                        • If - Conditions
                                                                                                          • (Unit-type of (Triggering unit)) Equal to Ardent Medic
                                                                                                        • Then - Actions
                                                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                            • If - Conditions
                                                                                                              • (Owner of (Sold unit)) Equal to Player 1 (Red)
                                                                                                            • Then - Actions
                                                                                                              • Hero - Drop the item from slot 1 of (Selling unit)
                                                                                                              • Hero - Create healer and give it to (Selling unit)
                                                                                                            • Else - Actions
                                                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                • If - Conditions
                                                                                                                  • (Owner of (Sold unit)) Equal to Player 2 (Blue)
                                                                                                                • Then - Actions
                                                                                                                  • Hero - Drop the item from slot 2 of (Selling unit)
                                                                                                                  • Hero - Create healer and give it to (Selling unit)
                                                                                                                • Else - Actions
                                                                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                    • If - Conditions
                                                                                                                      • (Owner of (Sold unit)) Equal to Player 3 (Teal)
                                                                                                                    • Then - Actions
                                                                                                                      • Hero - Drop the item from slot 3 of (Selling unit)
                                                                                                                      • Hero - Create healer and give it to (Selling unit)
                                                                                                                    • Else - Actions
                                                                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                        • If - Conditions
                                                                                                                          • (Owner of (Sold unit)) Equal to Player 4 (Purple)
                                                                                                                        • Then - Actions
                                                                                                                          • Hero - Drop the item from slot 4 of (Selling unit)
                                                                                                                          • Hero - Create healer and give it to (Selling unit)
                                                                                                                        • Else - Actions
                                                                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                            • If - Conditions
                                                                                                                              • (Owner of (Sold unit)) Equal to Player 5 (Yellow)
                                                                                                                            • Then - Actions
                                                                                                                              • Hero - Drop the item from slot 5 of (Selling unit)
                                                                                                                              • Hero - Create healer and give it to (Selling unit)
                                                                                                                            • Else - Actions
                                                                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                • If - Conditions
                                                                                                                                  • (Unit-type of (Triggering unit)) Equal to Ardent Redeemer
                                                                                                                                • Then - Actions
                                                                                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                    • If - Conditions
                                                                                                                                      • (Owner of (Sold unit)) Equal to Player 1 (Red)
                                                                                                                                    • Then - Actions
                                                                                                                                      • Hero - Drop the item from slot 1 of (Selling unit)
                                                                                                                                      • Hero - Create buffer and give it to (Selling unit)
                                                                                                                                    • Else - Actions
                                                                                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                        • If - Conditions
                                                                                                                                          • (Owner of (Sold unit)) Equal to Player 2 (Blue)
                                                                                                                                        • Then - Actions
                                                                                                                                          • Hero - Drop the item from slot 2 of (Selling unit)
                                                                                                                                          • Hero - Create buffer and give it to (Selling unit)
                                                                                                                                        • Else - Actions
                                                                                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                            • If - Conditions
                                                                                                                                              • (Owner of (Sold unit)) Equal to Player 3 (Teal)
                                                                                                                                            • Then - Actions
                                                                                                                                              • Hero - Drop the item from slot 3 of (Selling unit)
                                                                                                                                              • Hero - Create buffer and give it to (Selling unit)
                                                                                                                                            • Else - Actions
                                                                                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                • If - Conditions
                                                                                                                                                  • (Owner of (Sold unit)) Equal to Player 4 (Purple)
                                                                                                                                                • Then - Actions
                                                                                                                                                  • Hero - Drop the item from slot 4 of (Selling unit)
                                                                                                                                                  • Hero - Create buffer and give it to (Selling unit)
                                                                                                                                                • Else - Actions
                                                                                                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                    • If - Conditions
                                                                                                                                                      • (Owner of (Sold unit)) Equal to Player 5 (Yellow)
                                                                                                                                                    • Then - Actions
                                                                                                                                                      • Hero - Drop the item from slot 5 of (Selling unit)
                                                                                                                                                      • Hero - Create buffer and give it to (Selling unit)
                                                                                                                                                    • Else - Actions
                                                                                                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                        • If - Conditions
                                                                                                                                                          • (Unit-type of (Triggering unit)) Equal to Veledrion Pheonix
                                                                                                                                                        • Then - Actions
                                                                                                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                            • If - Conditions
                                                                                                                                                              • (Owner of (Sold unit)) Equal to Player 1 (Red)
                                                                                                                                                            • Then - Actions
                                                                                                                                                              • Hero - Drop the item from slot 1 of (Selling unit)
                                                                                                                                                              • Hero - Create nuker and give it to (Selling unit)
                                                                                                                                                            • Else - Actions
                                                                                                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                                • If - Conditions
                                                                                                                                                                  • (Owner of (Sold unit)) Equal to Player 2 (Blue)
                                                                                                                                                                • Then - Actions
                                                                                                                                                                  • Hero - Drop the item from slot 2 of (Selling unit)
                                                                                                                                                                  • Hero - Create nuker and give it to (Selling unit)
                                                                                                                                                                • Else - Actions
                                                                                                                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                                    • If - Conditions
                                                                                                                                                                      • (Owner of (Sold unit)) Equal to Player 3 (Teal)
                                                                                                                                                                    • Then - Actions
                                                                                                                                                                      • Hero - Drop the item from slot 3 of (Selling unit)
                                                                                                                                                                      • Hero - Create nuker and give it to (Selling unit)
                                                                                                                                                                    • Else - Actions
                                                                                                                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                                        • If - Conditions
                                                                                                                                                                          • (Owner of (Sold unit)) Equal to Player 4 (Purple)
                                                                                                                                                                        • Then - Actions
                                                                                                                                                                          • Hero - Drop the item from slot 4 of (Selling unit)
                                                                                                                                                                          • Hero - Create nuker and give it to (Selling unit)
                                                                                                                                                                        • Else - Actions
                                                                                                                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                                                                                            • If - Conditions
                                                                                                                                                                              • (Owner of (Sold unit)) Equal to Player 5 (Yellow)
                                                                                                                                                                            • Then - Actions
                                                                                                                                                                              • Hero - Drop the item from slot 5 of (Selling unit)
                                                                                                                                                                              • Hero - Create nuker and give it to (Selling unit)
                                                                                                                                                                            • Else - Actions
                                                                                                                                                        • Else - Actions
                                                                                                                                • Else - Actions
                                                                                                        • Else - Actions
                                                                                • Else - Actions
                                                        • Else - Actions
                                • Else - Actions
        • Else - Actions
When I try to activate the trigger, it tells me that the error involves something called Endif... my father (a programmer) told me that thats a script used to show the end of an if function. How would I add the Endif into a trigger via GUI? or Custom Scripts?
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Drop item in slot (Playernumber of Triggering Player) of Selling Unit
>.<

and nice avatar
 
Level 5
Joined
Dec 17, 2007
Messages
145
Jesus christ that's the longest GUI trigger I've seen in my entire life...

You probably missed something somewhere... And chances are, with a massive trigger like that, the game might've just plain fried.

Because GUI sucks like that, I tihnk you need to put something under all the blank "Else - Actions" you've got hanging around down there.

Other than that, I can't tell you what's wrong. The trigger is too freaking big to offer any more help than that.
 
Level 9
Joined
May 27, 2006
Messages
498
Your trigger doesn`t work, cause you put this in the Trigger Conditions:
  • Events:
  • Conditions:
    • (Unit-type of (Selling unit)) Equal to Celestial Portal
  • Actions:
After that you have put unit remove action, which runs if the condition above is true.
Next, you placed If Then Else line - which runs if Triggering (SELLING) unit equal to Veledrian Sentinel.
Note that the Trigger Conditions are not If Then Else, they check like this:
Condition = true = run trigger
Condition = false = dont run trigger


So as long as the trigger runs only when the selling unit equal to Celestial Portal, your first If Then Else - If Conditions are not true, so Then Actions cannot be done, and they automaticially run Else Actions - which do completely nothing, that`s your problem.

The solution is: Add one more If Then Else condition before all the others, that checks if Triggering (Selling) unit equal to Celestial Portal, in Then Actions put the rest of If Then Else`s, leave Else Actions empty.
 
Level 6
Joined
Aug 15, 2007
Messages
209
I was too lazy to read the whole thing, but somewhere you said "If Unit type of triggering unit = Veledrian Sentinel...blahblahblah.

The event is a unit selling a unit. Meaning the selling unit is the triggering unit, meaning it should be the "Celestial Portal" thing. Though I could be wrong, because I haven't seen your map. And that was one of the first conditions,so if its never true,then nothing ever happens. Might wanna look at that again.

I just realized that I said exactly what raft_pl said. >_> Sorry.
 
Last edited:
Status
Not open for further replies.
Top