| 10-24-2002, 06:38 PM | #1 |
I want to revive a non-hero unit (after it dies) and still maintain it's unique unit id (like Footman 0010). How can I go about doing this? Only thing I can think of is creating a hero with resurrect or something but I don't really want to do that... |
| 10-24-2002, 06:46 PM | #2 |
the triggers -make unit rescurrectable are they only for heroes? |
| 10-24-2002, 06:51 PM | #3 |
yea it's a hero trigger |
| 10-24-2002, 07:11 PM | #4 |
Heres what I did for my cops and robbers map- If unit owned by player1 dies unit equal to {unit} {Create 1 unit at {center of{revive}}] _______________ Use the Special Effects trigger for the taste of hero res Retaining basic I.D. is impossible. |
| 10-24-2002, 11:04 PM | #5 |
Guest | I wish there was a way to do it and keep the unique identifier, unfortunately, you cant. Once I even tried playing the stand animation and setting health to 100%. No good.. got units that stood there but were unselectable. Anyway.. just do this trigger for a quasi-ressurect: event: a unit owned by player x dies (or whatever event you like) action: replace (dying unit) with (unit-type of dying unit) simple enough, if you play the ressurect special effect on the unit it is indistinguishable from a normal ressurect, except that you lose any unique identifiers. You could always add the unit to a unit variable, that will work just as well.. just add this after the above action: set (unit variable named whatever) to last replaced unit then refer to that unit variable instead of your preplaced variable. Hope this helps. |
| 10-25-2002, 09:04 PM | #6 |
Guest | Make a trigger so that whenever the unit takes damage, it gains the HP back and instead loses mana. Then, when his mana=0, play the death animation and pause the unit. This'll have a problem with supply, but there might be a way to change the amount of supply taken as well. Maybe Unit - Hide Unit works with this? I bet it does. Anyway, then all you have to do is get the unit back via a trigger when you want it "revived". Use special effects when you revive it, as well. |
| 10-25-2002, 09:21 PM | #7 |
I don't think there's a way to detect the amount of damage a unit takes. If there is, I'd certainly like to know! :D |
| 10-26-2002, 02:35 AM | #8 |
Guest | There definetely is. You can use the event Specific Unit takes Damage, and the real number of Event Response - Damage Taken. |
| 10-26-2002, 07:25 AM | #9 |
Guest | Actually I was able to ressurect a unit without it losing its unique identifier, thats right, a non hero unit. If you've ever played Battlefield 1942 map for war3 you've seen the tanks die, well they don't die. Here is what I did, event - Tank 001 life becomes less than 5 Action- Change ownership of tank001 to neutral passive. Move tank 001 to (tank graveyard) Ok so basically you have to give the unit REINCARNATION, then when its life becomes less than 5, it still dies, but is moved to a region off in a corner, where it stays and reincarnates, then move it back when you need it, do the revival special effect. The reason I changed ownership is so the player cannot see the tank graveyard region while the unit sits there, when you move him back, change ownership back to what it was. Only problem is he can't die twice within 240 seconds or the unit won't come back. Hope this helps. |
