• 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.

[Solved] Looking for help with small trigger

Status
Not open for further replies.
Level 2
Joined
Dec 27, 2011
Messages
10
How to make a trigger which will work so:


Player 1 has entered the chat message : KILL

And then all the currently selected unit die.

Sorry for my English , it’s not my native. Thanks for help.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

I think the easiest way would be like this:

  • Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing KILL as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
Greetings and Peace
Dr. Boom
 
Level 2
Joined
Dec 27, 2011
Messages
10
it works, thank you :)

btw. what script i should use if i want change owner?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Sorry don't know what this means but you can do things like this one

  • Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing kill as An exact match
      • Player - Player 2 (Blue) types a chat message containing kill as An exact match
      • Player - Player 3 (Teal) types a chat message containing kill as An exact match
      • Player - Player 4 (Purple) types a chat message containing kill as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is selected by (Triggering player)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
Now every player can type the kill and he can destroy only his units!
 
Level 2
Joined
Dec 27, 2011
Messages
10
i mean how to make trigger which will work so:
player 1 entered the chat message : "TOP2"
and then all currently selected unit will change owner to player 2
 
Level 16
Joined
May 1, 2008
Messages
1,605
Like this?
  • Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing top2 as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to Player 2 (Blue) and Change color
 
Last edited:
Level 2
Joined
Dec 27, 2011
Messages
10
it works!

after 6 months of work my single player version of azeroth wars lr is complete! hurey!

thank you :))
 
Status
Not open for further replies.
Top