I want to create a spell that summon a golem, when the hero cast spell, he cast the similar spell.
What i have done is:
-The spell that summon golem is Infernal
-The hero got Decay (base on Thunder Clap) and Limbo (base on Impale) so i've create the similar spells for the golem.
-I set variable for hero caster and summoned unit, then set a variable for duration to remove it:

What i have done is:
-The spell that summon golem is Infernal
-The hero got Decay (base on Thunder Clap) and Limbo (base on Impale) so i've create the similar spells for the golem.
-I set variable for hero caster and summoned unit, then set a variable for duration to remove it:
-
Follow Infernal Caster
-
Events
-
Unit - A unit Finishes casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Inferno (Keeper)
-
-
Actions
-
Set Caster_unit = (Casting unit)
-
Set Summoned_unit = (Last created unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IF_duration Equal to 0.00
-
-
Then - Actions
-
Trigger - Turn on Follow Infernal Caster 2 <gen>
-
-
Else - Actions
-
-
Set IF_duration = 110.00
-
-
-
Follow Infernal Caster 2
-
Events
-
Time - Every 0.30 seconds of game time
-
-
Conditions
-
(Ability being cast) Equal to Inferno (Keeper)
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IF_duration Greater than 0.00
-
-
Then - Actions
-
Set IF_duration = (IF_duration - 0.30)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
IF_duration Less than or equal to 0.00
-
(Caster_unit is alive) Equal to False
-
(Summoned_unit is alive) Equal to False
-
-
-
-
Then - Actions
-
Set IF_duration = 0.00
-
Set Caster_unit = No unit
-
Set Summoned_unit = No unit
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-

-
Follow Decay
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Decay
-
(Casting unit) Equal to Caster_unit
-
-
Actions
-
Unit - Order Summoned_unit to Human Mountain King - Thunder Clap
-
-