| 04-28-2004, 04:20 PM | #1 |
I'm trying to find an event that does actions when a units life becomes less then X, but all i've found is.. Unit - X 0116 <gen>'s life becomes less than 1.00 but what i want is something more like Unit - A unit's life becomes less then 1.00 I'm sure it's something simple but i can't seem to find the event im after. |
| 04-28-2004, 04:42 PM | #2 | |
Quote:
Such an event doesn't exist. You could try to pick all units and check if their life is less than 1.00 Anyway, why would you need this ? |
| 04-28-2004, 05:45 PM | #3 | |
Quote:
i want a unit to be created when a unit's health becomes less then 1 (dies), but if i just do Unit - A unit dies, then it doesn't create a unit if the unit has reincarnation. |
| 04-28-2004, 05:58 PM | #4 |
Then add a second condition... unit uses reincarnation. |
| 04-28-2004, 09:05 PM | #5 |
There is no such thing as detecting when a unit uses reincarnation. The only way to detect this would be to detect when the hp of a unit with reincarnation drops below 0, but the unit doesn't die. That would also mean having an integer variable array for each unit that can have reincarnation where you can store the status of a unit (is it's hp below 0, but it isn't dead; or is it dead?), and another unit array to link this variables to their respecting units, at least that's the clumsy GUI way of doing it. I had to give it quite some thought before I sucessfully set up a set of triggers that detects Reincarnation in my currently developing map. It's a real pain and not suggested if you are not at least a little experienced in triggering (if you are, then you probably already know how to do it) |
| 04-29-2004, 02:51 AM | #6 | |
Quote:
Use the creep ability "spawn hydra," "spawn spiders," etc. Just modify the ability so that it spawn the number and type of units you want and give it to the unit that dies in the object editor. If you want to simulate a unit having reicarnation and spawning a unit when it "dies" try giving the unit 2 spawn ablities. One that spawns the same unit to mimic reincarnation (modify the casting time to delay the spawn), and another spawn ability that spawns the "created" unit. Of course it probably woudn't work very well with heroes. |
| 04-29-2004, 07:53 AM | #7 | |
Quote:
Code:
Event: a unit starts the effect of an ability Condition: ability being cast equal to reincarnation I don't see why this shouldn't work, have you tried this ? |
