H
handofra
Guest
I want that when the player type '-drop <ability name>', it will automatically remove the ability from the player's hero instantly. How do I do that?
Melee Initialization
Events
Map initialization
Conditions
Actions
Set AbilityName[1] = Blizzard
Set AbilityName[2] = Devotion
Type something
Events
Player - Player 1 (Red) types a chat message containing drop- as A substring
Player - Player 2 (Blue) types a chat message containing drop- as A substring
Player - Player 3 (Teal) types a chat message containing drop- as A substring
Player - Player 4 (Purple) types a chat message containing drop- as A substring
Player - Player 5 (Yellow) types a chat message containing drop- as A substring
((have one of these lines for each player you have in the map))
Conditions
(Substring((Entered chat string), 1, 5)) Equal to [B]drop-[/B]
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 6, (Length of (Entered chat string)))) Equal to [B]AbilityName[1][/B] -((This is our variable arrey :D))
Then - Actions
Unit - Remove Blizzard from (Random unit from (Random 1 units from (Units in (Playable map area) owned by (Triggering player))))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 6, (Length of (Entered chat string)))) Equal to [B]AbilityName[2][/B] ((There we have it again))
Then - Actions
Unit - Remove Devotion Aura from (Rally-Point of (Random unit from (Random 1 units from (Units in (Playable map area) owned by (Triggering player)))) as a unit)
Else - Actions
Do nothing