| 11-19-2005, 09:59 PM | #1 |
I was thinking, for the map that I'm making, instead of just spawning a unit that can revive heroes and is invulnerable, I thought I should just turn the spell around to make it so that it would cast a spell that ressurects a hero with very low life(maybe 10, 15% of their max life), but since all hero corpses dissapear when they die, I don't really know how I could make this work. Someone mind helping me? Like, I know that the Paladin's Ressurect spell only revives the 6 allied units around him, and obviously, if more then one hero dies, its just gonna revive the closest hero, right? So, how can I make a target-choosing Ressurect? |
| 11-20-2005, 12:14 AM | #2 |
Its simple. you can change the fact that the hero's corpse disapears after death in the object editor. make is resurectable and it might work. Can't say for sure if that will work at all. but i'm a but busy trying to make a stat based shockwave at the moment. so i cant test it out just now. ok that doesn't work, but this is what you can do. make a trigger that detects when a hero dies. save that point as a variable (might want to make it an array) then have your spell (if cast within a certain range of that point) resurect the hero with 10% life and move him to that location |
| 11-20-2005, 11:53 PM | #3 |
Thanks for telling me, but after thinking for awhile I decided for it to work in a different way. Sorry. Believe me, I did try to make the spell trigger that you made, but then I started to get confused to how a dying hero's position on the map gets stored into a variable, and then how to revive a hero through triggers. Anyways, I decided that the spell should revive all allied heroes and are revived next to the caster with 10% of their life... but, I don't really know how to store units or heroes into variables, as you could pretty much tell from the paragraph before. Can someone help me this time around? I'm totally confused on this one. So, first the everyone's heroes should be stored into variable or variables, and then they are reput onto the map next to the one who casted Life, then set to 10% life. I think that's how the spell should work. |
| 11-20-2005, 11:55 PM | #4 |
Heh all right. I've got some time i'll try to make it myself. first thing is before you can set something as a variable you need to make the variable. but I think it be best if you just look at the code when im finished. Ok so you want them revived next to the hero now? get right on it. Ok here ya go. It's two parted. First make a variable of unit type with an array of size 12. I named mine Unit_Dead_Hero. Next make a dummy ability called life. DONT base it off resurection as that requires corpses. use something like battle roar or thunderclap. something with no target. Code:
Hero dies
Event
Unit- A unit dies
Conditions
triggering unit is a hero equal to true
Actions
Set Unit_dead_hero(player number of(owner of triggering unit)) equal to triggering unit
Revive Hero
Event
Unit- A unit begins the effects of an ability
Condition
Ability being cast equal to life
Actions
Pick every player in Player group (allies of triggering player) and do actions
Loop actions
Hero- Instantly revive Unit_Dead_Hero(player number of picked player) at position of triggering unit. show revival graphics.
Unit- Set life of Unit_Dead_Hero(player number of picked player) to 10%
Set Unit_Dead_Hero(player number of picked player) = No unitthat should do it unless your players have more than one hero. if they do let me know and i'll tweak it some more. Oh and by all means keep asking me to make triggers for you. it makes me feel better about my inadequate editing skills ![]() |
| 11-21-2005, 01:06 AM | #5 |
That is great. Cool. Thanks a lot. Oh, and no, no one has more then one hero. I never asked you to do it anyways, you just volunteer(either that, or you are the first one to actually read the thread). |
| 11-21-2005, 01:14 AM | #6 |
ya i do volunteer to make it. i find it easier to show you than trying to explain it in words. plus it's fun. oh so fun. |
