| 02-01-2006, 10:24 PM | #1 |
I wanted to make a spell that is like Auto-Life, where it would cast a buff that will ressurect the hero back to life once it has died. It would be nice, but I haven't a clue of how I should do it. Can someone help, please? |
| 02-01-2006, 10:35 PM | #2 |
When the spell is cast, give the unit it is cast on the reincarnation ability with triggers. Then remove it when the buff timer runs out or it is dispelled. |
| 02-01-2006, 10:52 PM | #3 |
Hey, since it's a buff spell, don't I have to do the multiinstancible thingy? |
| 02-02-2006, 04:13 AM | #4 |
Another way you could do it is just make a dummy spell that gives the hero a buff and then just have triggers check for when a unit dies, if it has the dummy buff then revive the unit. |
| 02-02-2006, 07:33 AM | #5 |
Won't work, dead units have no buffs. Also, that would be different from reincarnation, because with it, the unit doesn't really die, so it doesn't award experience to the enemy. Ignitedstar: it depends, can more heroes cast this spell at the same time? If you have only one hero with this spell and the cooldown of it is longer than it's duration, then you don't have to worry about it because there's no way for two castings of the same spell to get mixed up. In any event, this spell is not hard to do, so you can just do the multi-instanceable version anyway. All you need is a unit group variable reserved for this spell. Whenever the spell is cast on a hero, add the ability to him and add him to the unit group. Then, in a periodic trigger that runs every second or so, check all units in the group if they have the buff, and if they no longer have it, take away the ability from them and remove them from the unit group. |
| 02-02-2006, 01:09 PM | #6 |
Anitarf is right, just add the buff, then remove it. I'll add that Vexorian had spell like this in some of his spellpacks (Caster System, if that doesn't make problems for you Ignited). You can look how he did it. |
| 02-02-2006, 08:48 PM | #7 |
It sort of does, but I can manage. Thanks a lot you guys. About that "if more then one unit can cast it" thing, I'm still debating weither I should make that possible, but I plan on doing something like that anyways. |
| 02-02-2006, 08:56 PM | #8 |
It depends, if only one of your units will have that spell, then don't bother. But if at least 2 units could cast it at same time, worry about it. But that won't make things hard, but will probably force you to use JASS. |
| 02-02-2006, 09:52 PM | #9 | |
Quote:
|
| 02-02-2006, 10:07 PM | #10 |
Maybe... I would make it in JASS anyways ![]() |
| 02-06-2006, 05:51 AM | #11 |
Wait, if I was to make the modded reincarnation ability, wouldn't it show up on the command card? Or, do I have to make the ability into an item ability? If I was to make an extra step, like if I wanted a hero to revive with half their life, how would I detect if a hero was revived due to the ability? In otherwords, how am I suppose to change their life knowing when the hero revived? |
| 02-06-2006, 08:04 AM | #12 |
Detecting reincarnation is kind of tricky, you should check out Vex's method for it. I found three versions at wc3jass.com, I guess you should use the latest one. For icon not showing on the command card, use the spellbook trick. |
