• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] I need some help with this trigger

Status
Not open for further replies.
Level 2
Joined
Jun 4, 2009
Messages
17
I've been trying to make a trigger, that when the host selects a unit\hero, and then types something like "Turn Blue", the unit\hero will change their owership to player 2.

This is My Trigger

  • Turn Blue
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 1 (Red) types a chat message containing Turn Blue as An exact match
    • Conditions
    • Actions
      • Unit - Change ownership of (Triggering unit) to Player 2 (Blue) and Change color
I'm still new to triggering, so what did I do wrong?
Because what only happens is that the units I select turn to player 2, even if I didn't typed "Turn Blue"
 
Last edited:
Level 5
Joined
Jan 4, 2007
Messages
103
Try this:
  • Events
    • Player - Player 1 (Red) Selects a unit
  • Conditions
  • Actions
    • Set HeroU1 = (Triggering unit)
Then this one:

  • Events
    • Player - Player 1 (Red) types a chat message containing Turn Blue as An exact match
    • Player - Player 1 (Red) types a chat message containing Turn Teal as An exact match
    • ect.
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Entered chat string) Equal to Turn Blue
      • Then - Actions
        • Unit - Change ownership of HeroU1 to Player 2 (Blue) and Change color
      • Else - Actions
        • Do nothing
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Entered chat string) Equal to Turn Teal
      • Then - Actions
        • Unit - Change ownership of HeroU to Player 3 (Teal) and Change color
      • Else - Actions
        • Do nothing
  • ect.
    • Trigger Turn off First Trigger
or this one but better 2 triggers:

  • Events
    • Player - Player 1 (Red) Selects a unit
    • Player - Player 1 (Red) types a chat message containing Turn Blue as An exact match
    • Player - Player 1 (Red) types a chat message containing Turn Teal as An exact match
    • ect.
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • (Entered chat string) Equal to Turn Blue
            • (Entered chat string) Equal to Turn Teal
            • ect.
      • Then - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Entered chat string) Equal to Turn Blue
          • Then - Actions
            • Unit - Change ownership of HeroU1 to Player 2 (Blue) and Change color
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Entered chat string) Equal to Turn Teal
          • Then - Actions
            • Unit - Change ownership of HeroU1 to Player 3 (Teal) and Change color
          • Else - Actions
            • Do nothing
      • Else - Actions
        • Set HeroU1 = (Triggering unit)
I'm still new to triggering, so what did I do wrong? cuz all what happens is that anytime I select someone they turn blue without the text...

You put 2 events and one action without a condition, if any of the two events happen, the action will start.:) It's not both events, it or-any of them.:)

Hope it helps:)
 
Level 2
Joined
Jun 4, 2009
Messages
17
how do you add that last part with the "Trigger Turn off First Trigger"
also thanks for your this would help me alot :D
 
Status
Not open for further replies.
Top