HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Remove from Time

07-21-2004, 02:07 AM#1
THE_END
I have been thinking of a really cool idea. A unit begins channeling a ability called Remove from Time. The target, while targeted cannot do anything, no attacking moving, casting. If the channeler dies the unit comes back to reality. After 15 seconds of this channeling the targeted unit just disappears, no death animation, death with dissappearance. The channeling will have the drain mana link special art between the target and caster. Someone tell me how to do this. THANKS!
07-21-2004, 02:19 AM#2
johnfn
Why dont you just pause the unit (Unit - pause) and then wait 15 seconds, check to see if the unit is dead, and if not, kill the unit? Seems pretty easy to me. Thats actually a pretty interesting idea for a spell (with the right special effects of course ^^)
07-21-2004, 02:22 AM#3
th15
Have one trigger that starts when the spell is cast that pauses the target unit. You will have to assign the target unit to a unit variable.

Have another trigger that goes off either 15 seconds after the 1st trigger or when the unit stops casting the spell and that unpauses the unit variable.
07-21-2004, 04:02 AM#4
Shimrra
Channeling moves pose the problem of detecting if the unit stops channeling prematurely. I've always tried to counter this with running a loop every half second to see if the caster's order is still equal to the order string of the ability and if it isn't then I cancel the effects. To do this, you use an order comparison, like "Current order of casting unit is equal to earthquake". I belive that the order string for mana drain is 'drain', dispite the fact that the WE neglects to show it.

Good luck with your ability!
08-09-2004, 05:02 PM#5
THE_END
Okay, I was actually thinking of doing this for the triggers, a unit is targeted by the Erase from Time spell, becomes invulnerable and paused. Reason for invulnerability is becasue he is in a time rift. Then 15 seconds later he just vanishes. The animation will be mana drain link but target will be ethereal looking. Im trying it out today! I might post it on WC3 Search!
08-09-2004, 05:27 PM#6
Anitarf
It's not hard to do. Just make your remove from time ability on the basis of mana drain, allow it to target units without mana, and make it drain 0 mana/life per second. Here's the trigger code (I'm going to write it so that there may be multiple heroes with such an ability in the game, but only one hero per player).

Code:
Events:
  A unit starts the effect of an ability
Conditions:
  Ability being cast equal to Remove from Time
Actions:
  Unit - Pause (target unit of ability being cast)
  Set TempUnitVariable[(player number of (owner of (casting unit)))] = (target unit of ability being cast)
Code:
Events:
  A unit stops casting an ability
Conditions:
  Ability being cast equal to Remove from Time
Actions:
  Unit - Unpause TempUnitVariable[(player number of (owner of (casting unit)))]
Code:
Events:
  A unit finishes casting an ability
Conditions:
  Ability being cast equal to Remove from Time
Actions:
  Unit - Remove TempUnitVariable[(player number of (owner of (casting unit)))]  

Shimmra, as you can see, this is also a very simple way to determine if channeling was interrupted. "Finishes casting an ability" event only runs if channeling is completed succesfuly, while "Stops casting an ability" event runs whenever casting is stopped, no matter if it's finished or interrupted.