EDIT:Hmm... Now i'm thinking burrow will never work, because i tested only the burrow, unburrow with no special effcts, and... well, when you burrow the hero loses all of his skills, making it impossible to unburrow. =/ Do you have any suggestion about other skills to use?
Well, hello guys!
I'm making my first spell, "Dig".
But i'm having some trouble. First, i don't know how to make the stun effect trough a trigger. But, well, this is not the worst part. The real problem is making the "enemy hero comes next to your hole".
I based my ability on "burrow", so my hero is burrowed. Next i did the trigger, and a Point right on the caster. Next i made a dummy unit, so i could store it on a variable.
Next, i made another trigger. The event is: A unit comes within 200 of "unit".
I can't change this unit to the dummy unit i stored on the variable!
Here is what i currently made:
Well, hello guys!
I'm making my first spell, "Dig".
JASS:
The Royal Guard digs up a hole on the ground and hide himself allowing an improved hitpoints regeneration. Also, if an enemy hero comes next to your hole, it is trapped and stunned for (2xSkillLvl)|n|cffffcc00Cooldown|r|n|cffffdead:10 seconds
But i'm having some trouble. First, i don't know how to make the stun effect trough a trigger. But, well, this is not the worst part. The real problem is making the "enemy hero comes next to your hole".
I based my ability on "burrow", so my hero is burrowed. Next i did the trigger, and a Point right on the caster. Next i made a dummy unit, so i could store it on a variable.
Next, i made another trigger. The event is: A unit comes within 200 of "unit".
I can't change this unit to the dummy unit i stored on the variable!
Here is what i currently made:
Code:
Dig
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dig
Actions
Set DiggedHole = (Position of (Triggering unit))
Unit - Create 1 Dig Dummy for (Triggering player) at DiggedHole facing Default building facing degrees
Set DiggedHole_Reg = (Last created unit)
Custom script: call RemoveLocation( udg_DiggedHole )