1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

-Ally/-Unally Command help!

Discussion in 'World Editor Help Zone' started by jojoman55, Apr 29, 2010.

  1. jojoman55

    jojoman55

    Joined:
    Mar 19, 2008
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Can someone please tell me how to create a -ally/-unally trigger/command in my map. Please help me with this as I am making a builder game. Thanks!
     
  2. TwentyThree

    TwentyThree

    Joined:
    Sep 1, 2009
    Messages:
    105
    Resources:
    0
    Resources:
    0
    • Ally Unally
      • Events
        • Player - Player 1 (Red) types a chat message containing -ally as A substring
        • Player - Player 2 (Blue) types a chat message containing -ally as A substring
        • Player - Player 3 (Teal) types a chat message containing -ally as A substring
        • Player - Player 4 (Purple) types a chat message containing -ally as A substring
        • Player - Player 5 (Yellow) types a chat message containing -ally as A substring
        • Player - Player 6 (Orange) types a chat message containing -ally as A substring
        • Player - Player 7 (Green) types a chat message containing -ally as A substring
        • Player - Player 8 (Pink) types a chat message containing -ally as A substring
        • Player - Player 9 (Gray) types a chat message containing -ally as A substring
        • Player - Player 10 (Light Blue) types a chat message containing -ally as A substring
        • Player - Player 1 (Red) types a chat message containing -unally as A substring
        • Player - Player 2 (Blue) types a chat message containing -unally as A substring
        • Player - Player 3 (Teal) types a chat message containing -unally as A substring
        • Player - Player 4 (Purple) types a chat message containing -unally as A substring
        • Player - Player 5 (Yellow) types a chat message containing -unally as A substring
        • Player - Player 6 (Orange) types a chat message containing -unally as A substring
        • Player - Player 7 (Green) types a chat message containing -unally as A substring
        • Player - Player 8 (Pink) types a chat message containing -unally as A substring
        • Player - Player 9 (Gray) types a chat message containing -unally as A substring
        • Player - Player 10 (Light Blue) types a chat message containing -unally as A substring
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Substring((Entered chat string), 1, 5)) Equal to -ally
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Triggering player) Not equal to Player 1 (Red)
                • (Substring((Entered chat string), 7, 17)) Equal to red
              • Then - Actions
                • Player - Make (Triggering player) treat Player 1 (Red) as an Ally with shared vision
                • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 1 (Red))))
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Triggering player) Not equal to Player 2 (Blue)
                    • (Substring((Entered chat string), 7, 17)) Equal to blue
                  • Then - Actions
                    • Player - Make (Triggering player) treat Player 2 (Blue) as an Ally with shared vision
                    • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 2 (Blue))))
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Triggering player) Not equal to Player 3 (Teal)
                        • (Substring((Entered chat string), 7, 17)) Equal to teal
                      • Then - Actions
                        • Player - Make (Triggering player) treat Player 3 (Teal) as an Ally with shared vision
                        • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 3 (Teal))))
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Triggering player) Not equal to Player 4 (Purple)
                            • (Substring((Entered chat string), 7, 17)) Equal to purple
                          • Then - Actions
                            • Player - Make (Triggering player) treat Player 4 (Purple) as an Ally with shared vision
                            • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 4 (Purple))))
                          • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • (Triggering player) Not equal to Player 5 (Yellow)
                                • (Substring((Entered chat string), 7, 17)) Equal to yellow
                              • Then - Actions
                                • Player - Make (Triggering player) treat Player 5 (Yellow) as an Ally with shared vision
                                • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 5 (Yellow))))
                              • Else - Actions
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • (Triggering player) Not equal to Player 6 (Orange)
                                    • (Substring((Entered chat string), 7, 17)) Equal to orange
                                  • Then - Actions
                                    • Player - Make (Triggering player) treat Player 6 (Orange) as an Ally with shared vision
                                    • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 6 (Orange))))
                                  • Else - Actions
                                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      • If - Conditions
                                        • (Triggering player) Not equal to Player 7 (Green)
                                        • (Substring((Entered chat string), 7, 17)) Equal to green
                                      • Then - Actions
                                        • Player - Make (Triggering player) treat Player 7 (Green) as an Ally with shared vision
                                        • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 7 (Green))))
                                      • Else - Actions
                                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          • If - Conditions
                                            • (Triggering player) Not equal to Player 8 (Pink)
                                            • (Substring((Entered chat string), 7, 17)) Equal to pink
                                          • Then - Actions
                                            • Player - Make (Triggering player) treat Player 8 (Pink) as an Ally with shared vision
                                            • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 8 (Pink))))
                                          • Else - Actions
                                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              • If - Conditions
                                                • (Triggering player) Not equal to Player 9 (Gray)
                                                • (Substring((Entered chat string), 7, 17)) Equal to gray
                                              • Then - Actions
                                                • Player - Make (Triggering player) treat Player 9 (Gray) as an Ally with shared vision
                                                • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 9 (Gray))))
                                              • Else - Actions
                                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                  • If - Conditions
                                                    • (Triggering player) Not equal to Player 10 (Light Blue)
                                                    • (Substring((Entered chat string), 7, 17)) Equal to light blue
                                                  • Then - Actions
                                                    • Player - Make (Triggering player) treat Player 10 (Light Blue) as an Ally with shared vision
                                                    • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has allied + (Name of Player 10 (Light Blue))))
                                                  • Else - Actions
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Substring((Entered chat string), 1, 7)) Equal to -unally
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Triggering player) Not equal to Player 1 (Red)
                    • (Substring((Entered chat string), 9, 19)) Equal to red
                  • Then - Actions
                    • Player - Make (Triggering player) treat Player 1 (Red) as an Enemy
                    • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 1 (Red))))
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Triggering player) Not equal to Player 2 (Blue)
                        • (Substring((Entered chat string), 9, 19)) Equal to blue
                      • Then - Actions
                        • Player - Make (Triggering player) treat Player 2 (Blue) as an Enemy
                        • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 2 (Blue))))
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Triggering player) Not equal to Player 3 (Teal)
                            • (Substring((Entered chat string), 9, 19)) Equal to teal
                          • Then - Actions
                            • Player - Make (Triggering player) treat Player 3 (Teal) as an Enemy
                            • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 3 (Teal))))
                          • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • (Triggering player) Not equal to Player 4 (Purple)
                                • (Substring((Entered chat string), 9, 19)) Equal to purple
                              • Then - Actions
                                • Player - Make (Triggering player) treat Player 4 (Purple) as an Enemy
                                • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 4 (Purple))))
                              • Else - Actions
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • (Triggering player) Not equal to Player 5 (Yellow)
                                    • (Substring((Entered chat string), 9, 19)) Equal to yellow
                                  • Then - Actions
                                    • Player - Make (Triggering player) treat Player 5 (Yellow) as an Enemy
                                    • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 5 (Yellow))))
                                  • Else - Actions
                                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      • If - Conditions
                                        • (Triggering player) Not equal to Player 6 (Orange)
                                        • (Substring((Entered chat string), 9, 19)) Equal to orange
                                      • Then - Actions
                                        • Player - Make (Triggering player) treat Player 6 (Orange) as an Enemy
                                        • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 6 (Orange))))
                                      • Else - Actions
                                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          • If - Conditions
                                            • (Triggering player) Not equal to Player 7 (Green)
                                            • (Substring((Entered chat string), 9, 19)) Equal to green
                                          • Then - Actions
                                            • Player - Make (Triggering player) treat Player 7 (Green) as an Enemy
                                            • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 7 (Green))))
                                          • Else - Actions
                                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              • If - Conditions
                                                • (Triggering player) Not equal to Player 8 (Pink)
                                                • (Substring((Entered chat string), 9, 19)) Equal to pink
                                              • Then - Actions
                                                • Player - Make (Triggering player) treat Player 8 (Pink) as an Enemy
                                                • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 8 (Pink))))
                                              • Else - Actions
                                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                  • If - Conditions
                                                    • (Triggering player) Not equal to Player 9 (Gray)
                                                    • (Substring((Entered chat string), 9, 19)) Equal to gray
                                                  • Then - Actions
                                                    • Player - Make (Triggering player) treat Player 9 (Gray) as an Enemy
                                                    • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 9 (Gray))))
                                                  • Else - Actions
                                                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                      • If - Conditions
                                                        • (Triggering player) Not equal to Player 10 (Light Blue)
                                                        • (Substring((Entered chat string), 9, 19)) Equal to light blue
                                                      • Then - Actions
                                                        • Player - Make (Triggering player) treat Player 10 (Light Blue) as an Enemy
                                                        • Game - Display to (All players) for 15.00 seconds the text: ((Name of (Triggering player)) + ( has unallied + (Name of Player 10 (Light Blue))))
                                                      • Else - Actions
              • Else - Actions


    this is a subscipt ally/unally, hope this helped ^_^
     
  3. jojoman55

    jojoman55

    Joined:
    Mar 19, 2008
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    It's really helpful, but half this stuff I can't find... For example how do I get to the If --> (All Conditions are True) <-- then do --> (Then Actions) <-- else do --> (Else Actions) <--
     
  4. swipe5weep

    swipe5weep

    Joined:
    Mar 22, 2009
    Messages:
    273
    Resources:
    0
    Resources:
    0
    It is in the Action tab. Press "I" until you find it.
     
  5. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    What an ugly trigger. No offense, GUI's just bad-lookin'.
     
  6. GoGoTauren

    GoGoTauren

    Joined:
    Mar 3, 2009
    Messages:
    322
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Theres a better way to do it. Ally/unally triggers suck.

    Have you ever noticed the ally menu ingame? (F11)

    You can make it useable by going

    • Game - Set Lock alliance settings to Off


    in your initialization trigger. Its in Game - Set map flag

    good luck with your map :D

    Also, if you have trouble finding triggers, go new trigger, then above the trigger list where it says 'All' click it and then go search for text, and type in what youre looking for.
     
  7. TwentyThree

    TwentyThree

    Joined:
    Sep 1, 2009
    Messages:
    105
    Resources:
    0
    Resources:
    0
    >_> i concur, it does look bad, but easier for people who dont understand JASS to understand