is there a gui trigger that can change ownership of a hero as in if a player types greedisgood then it changes the ownership of there hero
to neutral passive? i tried using this one:
event: player 1 red types greedisgood as an exact match
condition: triggering unit owns a hero
action: change triggering unit ownership to neutral passive
Edit : ((Put original text in spoilers.)) I misread the post, so ill change it up..i can make the trigger, quite simple, thats if its only one hero that you possess..if not it will get a bit tricky..If you have only one hero, this will work...otherwise if not, i will have to know more information about the map, regarding how you get the heros and such so i can pinpoint it all.
Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Picked unit) is A Hero) Equal to True)) and do (Unit - Change ownership of (Picked unit) to Neutral Passive and Change color)
--------Original Post (Contains selection trigger)
Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing greedisgood as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Unit - Change ownership of (Picked unit) to Neutral Passive and Change color)
This, though, will only work if player 1 were to type it..meaning you would have to be red each time ya play to use it..to use it for every player, use this instead.
Untitled Trigger 002
Events
Player - Player 1 (Red) types a chat message containing greedisgood as An exact match
Player - Player 2 (Blue) types a chat message containing greedisgood as An exact match
Player - Player 3 (Teal) types a chat message containing greedisgood as An exact match
Player - Player 4 (Purple) types a chat message containing greedisgood as An exact match
Player - Player 5 (Yellow) types a chat message containing greedisgood as An exact match
Player - Player 6 (Orange) types a chat message containing greedisgood as An exact match
Player - Player 7 (Green) types a chat message containing greedisgood as An exact match
Player - Player 8 (Pink) types a chat message containing greedisgood as An exact match
Player - Player 9 (Gray) types a chat message containing greedisgood as An exact match
Player - Player 10 (Light Blue) types a chat message containing greedisgood as An exact match
Player - Player 11 (Dark Green) types a chat message containing greedisgood as An exact match
Player - Player 12 (Brown) types a chat message containing greedisgood as An exact match
Conditions
Actions
-------- Red --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 1 (Red)
Then - Actions
Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Unit - Change ownership of (Picked unit) to Neutral Passive and Change color)
Else - Actions
-------- Blue --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 2 (Blue)
Then - Actions
Unit Group - Pick every unit in (Units currently selected by Player 2 (Blue)) and do (Unit - Change ownership of (Picked unit) to Neutral Passive and Change color)
Else - Actions
-------- Teal --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 3 (Teal)
Then - Actions
Unit Group - Pick every unit in (Units currently selected by Player 3 (Teal)) and do (Unit - Change ownership of (Picked unit) to Neutral Passive and Change color)
Else - Actions
-------- And continue on for every other player... --------
Dont let the size fool ya, its really not that hard. You just need to copy and paste the event for every player, then make an If/then/else and change the options as so, and copy that for every player and change the options accordingly. Its not hard, just a little time consuming. Hope this answers your question.