I made a spell that casts a buff on a unit and if that unit is killed while being being under the buff, the unit is resurrected, the buff can be dispelled...
Here are the triggers:
Rebirth
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Rebirth
Actions
Set RUnit = (Target unit of ability being cast)
Trigger - Turn on Rebirth Buff Destroyed
Rebirth Buff Destroyed
Events
Time - Every 0.50 seconds of game time
Conditions
((RUnit is alive) Equal to True) and ((RUnit has buff Rebirth (Custom)) Equal to False)
Actions
Set RUnit = NoUnit
Trigger - Turn off (This trigger)
Raise Rebirth Unit
Events
Unit - A unit Dies
Conditions
(Dying unit) Equal to RUnit
Actions
Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
Unit - Create 1 (Unit-type of RUnit) for Player 1 (Red) at (Position of (Dying unit)) facing Default building facing degrees
Now I was wondering if there was a better way this can be done...
Also I know that I can make a dummy unit with a modified ability of resurrection appear and cast it to bring back the fallen unit...
Custom Spell
-
- Terran Goliath Dome Polisher
- Posts: 106
- Joined: Fri Feb 15, 2008 12:02 pm
Custom Spell
Last edited by Blake on Thu Apr 24, 2008 7:12 pm, edited 1 time in total.
-
- Zerg Hydralisk Nail Stylist
- Posts: 597
- Joined: Tue Sep 19, 2006 7:37 pm
Re: Custom Spell
Uh.
Raise Rebirth Unit
Events
Unit - A unit Dies
Conditions
(Dying unit) has buff Rebirth equal to True.
Actions
Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
Unit - Create 1 Unit-type of dying unit at position of Dying Unit.
And you should only need the one trigger.
Raise Rebirth Unit
Events
Unit - A unit Dies
Conditions
(Dying unit) has buff Rebirth equal to True.
Actions
Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
Unit - Create 1 Unit-type of dying unit at position of Dying Unit.
And you should only need the one trigger.
-
- Terran Goliath Dome Polisher
- Posts: 106
- Joined: Fri Feb 15, 2008 12:02 pm
Re: Custom Spell
I'm pretty sure that any buffs a unit has are removed once the unit dies, so this trigger alone will not work.tipereth wrote: Uh.
Raise Rebirth Unit
Events
Unit - A unit Dies
Conditions
(Dying unit) has buff Rebirth equal to True.
Actions
Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
Unit - Create 1 Unit-type of dying unit at position of Dying Unit.
And you should only need the one trigger.
-
- Zerg Hydralisk Nail Stylist
- Posts: 597
- Joined: Tue Sep 19, 2006 7:37 pm
Re: Custom Spell
Try it.
- Xenon
- Zerg Queen's Nest Slave Trainee
- Posts: 771
- Joined: Mon Oct 23, 2006 3:29 pm
Re: Custom Spell
It's a really bad idea to create special effects and not destroy them. Just destroy the (last created special effect) immediately; it won't just disappear immediately but will be removed after 5 seconds, which is usually enough for short-term animated ones.
-
- Terran Goliath Dome Polisher
- Posts: 106
- Joined: Fri Feb 15, 2008 12:02 pm
Re: Custom Spell
I've tried it, it doesn't seem to work, I've also tried it with a slightly altered trigger...
Untitled Trigger 001
Events
Unit - A unit Dies
Conditions
((Dying unit) has buff Rebirth of the Phoenix ) Equal to True
Actions
Set rebirth = (Dying unit)
Set RevivePoint = (Position of (Dying unit))
Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
Unit - Create 1 (Unit-type of rebirth) for Player 1 (Red) at RevivePoint facing Default building facing degrees
Doesn't seem to work either...
Untitled Trigger 001
Events
Unit - A unit Dies
Conditions
((Dying unit) has buff Rebirth of the Phoenix ) Equal to True
Actions
Set rebirth = (Dying unit)
Set RevivePoint = (Position of (Dying unit))
Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
Unit - Create 1 (Unit-type of rebirth) for Player 1 (Red) at RevivePoint facing Default building facing degrees
Doesn't seem to work either...
What's wrong with not destroying special effects? Do they lag the game up later?Xenon wrote: It's a really bad idea to create special effects and not destroy them. Just destroy the (last created special effect) immediately; it won't just disappear immediately but will be removed after 5 seconds, which is usually enough for short-term animated ones.
- Xenon
- Zerg Queen's Nest Slave Trainee
- Posts: 771
- Joined: Mon Oct 23, 2006 3:29 pm
Re: Custom Spell
Yes, and there's a limit to the number of special effects that can be in the game at a time. If you don't destroy them they add up.
-
- Terran Goliath Dome Polisher
- Posts: 106
- Joined: Fri Feb 15, 2008 12:02 pm
Re: Custom Spell
Oh, thanks for telling me, I thought that just because they're not visible means they ceased to exist..Xenon wrote: Yes, and there's a limit to the number of special effects that can be in the game at a time. If you don't destroy them they add up.
- RazorclawX
- Xel'naga World Shaper
- Posts: 2100
- Joined: Thu Aug 24, 2006 7:19 pm
Re: Custom Spell
Couldn't you use the triggers to temporarily add a variant of Reincarnate to the unit, then remove it later?
-
- Terran Goliath Dome Polisher
- Posts: 106
- Joined: Fri Feb 15, 2008 12:02 pm
Re: Custom Spell
Trouble is, I was trying to make it so that even if an enemy unit was put under this spell it would be reborn as your unit...there's an item called "ruin of rebirth" I believe, if i remember correctly that does just that, however the ability wont work unless a dead unit actually drops that item...RazorclawX wrote: Couldn't you use the triggers to temporarily add a variant of Reincarnate to the unit, then remove it later?
Thing is to make this spell dispel-able you need to make another trigger, because buffs are automatically removed from a dead unit upon death...
Last edited by Blake on Fri Apr 25, 2008 7:04 pm, edited 1 time in total.