Need help with triggering spells

zedak

New Member
Reaction score
0
I'm making a trigger like this;

Player - Player 1 (Red) types a chat message containing -renew as An exact match
Unit - Remove Blizzard from (Triggering unit)
Unit - Add Blink to (Triggering unit)

I know that "Triggering unit" is wrong, but what shall i choose instead of it to get blink instead of blizzard on the hero? The player do only got one unit. And how do i make a spell that remove all cooldowns ? :)

Another question is; How shall i do an arena that is after one minute of a game, 2 random heroes shall be moved instantly to an arena region and fight !
 

UndeadDragon

Super Moderator
Reaction score
447
You will need to set your heroes into a unit array when they are picked like:

Code:
set Heroes[1] = Mountain King
set Heroes[2] = Bloodmage

Then you will need to do:

Code:
Player - Player 1 (Red) types a chat message containing -renew as An exact match
Unit - Remove Blizzard from Heroes[Player number of (Triggering Player)]
Unit - Add Blink to Heroes[Player number of (Triggering Player)]
 

emilemil1

New Member
Reaction score
20
Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) types a chat message containing -renew as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            Loop - Actions
                Unit - Remove Blizzard from (Picked unit)
                Unit - Add Blink to (Picked unit)
        Custom script:   call DestroyGroup(GetLastCreatedGroup())

That should work if you are only using 1 hero for player 1 red

To remove all cooldowns:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Your_Ability
    Actions
        Unit - Reset ability cooldowns for (Casting unit)

For a duel timer: (start a timer, possibly with a timer window, at map initialization

Code:
Untitled Trigger 001
    Events
        Time - Timer expires
    Conditions
    Actions
        Unit Group - Pick every unit in (Random 2 units from (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))) and do (Unit - Move (Picked unit) instantly to (Center of (Your_Region)))

This will pick 2 random heroes on the map and move them to a region after 1 minute. However it does not check if they are enemies or if there are any computer heroes on the map so it will only work in FFA with only player heroes.

Then:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Dies
    Conditions
       Duel_Arena contains (Dying unit)) Equal to True
    Actions
        Unit - Move (Killing unit) instantly to Your_Region
        Countdown Timer - Start Timer as a One-shot timer that will expire in 60.00 seconds (if you want continous duels)

It is not a code that can be exacly copied into your map because i can not create a exact code without more info ^^ i still hoped it helped
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top