• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Special Rooting

Status
Not open for further replies.
Level 5
Joined
Feb 6, 2009
Messages
96
Hey! I need for my Map a special spell
I want to have the normal root ability of the keeper but the duration has to be (mana the caster has / 10 ) is this possible?

Frozenbrain :)
 
Level 7
Joined
May 21, 2009
Messages
289
You could most likely do this with a trigger, I'm not quite sure how because in order to keep the normal root ability your event would have to be the casting of the ability, and then your ability would already have a duration, if you know what I mean. So I don't think you can do it with the normal root ability, but most likely if you make the spell a trigger.

You could do something like this if this is what you want. . .
Event:
Unit finishes casting an ability

Condition:
(Ability being cast) equal to Entangling Roots

Actions:
Unit- Pause
Special Effect- (the entangling roots effect at the postion of the unit)
Wait- Unit Property- Mana of casting unit/10
Unit- Unpause

You would have to set the original roots spell to a duration of like .01 seconds

EDIT:
I fogot about the damage roots does, if you want to do that you could make all the damage be done at the end (target of casting spell), or have it do no damage or have it wait mana of casting unit -1/something like that and deal damage after every wait.
 
Level 5
Joined
Feb 6, 2009
Messages
96
hm i'll try that! thank you! :)

Edit: Hm i just have one more problem i want to make that when you use the ability his mana is again set down to 0
 
Level 8
Joined
Jan 8, 2010
Messages
493
use Event - Unit Starts the Effect of an Ability, since this triggers the event after the ability has started its cooldown countdown (the moment that darkened icon appears with clockwise whitening thing). and also use Special Effect - Create Special Effect on Unit and attach it to the origin, since making it appear on the unit's position will look weird if it is suddenly knocked back.

and add to that trigger Unit - Set mana of Triggering Unit to 0 so its mana will turn 0 after casting the ability.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
If you set the duration of the ability to zero in object editor, it will last forever.

Save the duration and the targeted unit into variables and add the targeted unit into a unit group. Set the mana of the caster to zero.

Create another trigger that runs periodically an picks all unit in the unit group. Subtract from the timer value the period of the trigger. When it hits zero or less or the unit is dead, remove Entangling Roots buff from the unit and remove the unit from the unit group.

That's a better way in my opinion than just pausing/unpausing the unit.
 
Level 5
Joined
Feb 6, 2009
Messages
96
well i tried it now with pause triggering unit and with the spezialeffekt...
but the effekt sometimes doesnt show up! can i change that somehow?
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
If you set the duration of the ability to zero in object editor, it will last forever.

Save the duration and the targeted unit into variables and add the targeted unit into a unit group. Set the mana of the caster to zero.

Create another trigger that runs periodically an picks all unit in the unit group. Subtract from the timer value the period of the trigger. When it hits zero or less or the unit is dead, remove Entangling Roots buff from the unit and remove the unit from the unit group.

That's a better way in my opinion than just pausing/unpausing the unit.


That's the best way of solving this.

Do not use "wait" in your function as it will most likly not be mui.
 
Status
Not open for further replies.
Top