I want to create spell that have chance to start effect when casting other spell. but it doesn't work when cast some spell.
first spell is moonfire
second effect is when cast first spell or other, have chance to blast random point around target unit.
can someone help??
first spell is moonfire
Code:
Moonfire
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Moonfire
Actions
Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing (Target point of ability being cast)
Unit - Add [COLOR="red"]Moonfire (Dummy)[/COLOR] to (Last created unit)
Unit - Set level of [COLOR="red"]Moonfire (Dummy)[/COLOR] for (Last created unit) to (Level of [COLOR="red"]Moonfire[/COLOR] for (Casting unit))
Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire (Target unit of ability being cast)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
second effect is when cast first spell or other, have chance to blast random point around target unit.
Code:
Eclipse
Events
Unit - A unit Starts the effect of an ability
Conditions
(Level of Eclipse for (Casting unit)) Greater than 0
Actions
Unit - Set the custom value of (Casting unit) to (Random integer number between 1 and 100)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Casting unit)) Less than or equal to (((Level of Eclipse for (Casting unit)) + 1) x 10)
Then - Actions
For each (Integer A) from 1 to (Random integer number between 3 and 5), do (Actions)
Loop - Actions
Wait 0.20 seconds
Unit - Create 1 [COLOR="red"]Eclipse[/COLOR] for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by ((Random real number between -125.00 and 125.00), (Random real number between -125.00 and 125.00))) facing (Position of (Target unit of ability being cast))
Else - Actions
can someone help??