Message based on player unit

Status
Not open for further replies.
Level 11
Joined
Aug 6, 2009
Messages
697
Is there anyway to make it so if a player types a message and has a unit of type (blabla), it will do an action?
In this trigger despite which hero I have it still shows only one specific hero message (I have multiple triggers in an attempt to avoid this but it doesn't work).
So lets say I have a mountain king and I type "Help", it will show the help message meant for the Paladin.
  • HelpUnit
    • Events
      • Player - Player 1 (Red) types a chat message containing Help as An exact match
      • Player - Player 2 (Blue) types a chat message containing Help as An exact match
      • Player - Player 3 (Teal) types a chat message containing Help as An exact match
      • Player - Player 4 (Purple) types a chat message containing Help as An exact match
      • Player - Player 5 (Yellow) types a chat message containing Help as An exact match
      • Player - Player 6 (Orange) types a chat message containing Help as An exact match
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (All units of (Units owned by (Triggering player) of type Mountain King) are in (Playable map area)) Equal to True
          • (All units of (Units owned by (Triggering player) of type Mountain King (Form 1)) are in (Playable map area)) Equal to True
          • (All units of (Units owned by (Triggering player) of type Mountain King (Form 2)) are in (Playable map area)) Equal to True
    • Actions
      • Quest - Display to (Player group((Triggering player))) the Quest Update message:(insert message here)
Trigger 2:
  • HelpUnit
    • Events
      • Player - Player 1 (Red) types a chat message containing Help as An exact match
      • Player - Player 2 (Blue) types a chat message containing Help as An exact match
      • Player - Player 3 (Teal) types a chat message containing Help as An exact match
      • Player - Player 4 (Purple) types a chat message containing Help as An exact match
      • Player - Player 5 (Yellow) types a chat message containing Help as An exact match
      • Player - Player 6 (Orange) types a chat message containing Help as An exact match
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (All units of (Units owned by (Triggering player) of type Paladin) are in (Playable map area)) Equal to True
          • (All units of (Units owned by (Triggering player) of type Paladin (Form 1)) are in (Playable map area)) Equal to True
          • (All units of (Units owned by (Triggering player) of type Paladin (Form 2)) are in (Playable map area)) Equal to True
    • Actions
      • Quest - Display to (Player group((Triggering player))) the Quest Update message:(insert message here)
 
  • Help
    • Events
      • Player - Player 1 (Red) types a chat message containing Help as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Mountain King
            • Then - Actions
              • Game - Display to (All players) the text: Mountain King!
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Paladin
            • Then - Actions
              • Game - Display to (All players) the text: Paladin!
            • Else - Actions
like this maybe?

EDIT: WOW I'm slow..
 
Status
Not open for further replies.
Back
Top