| 04-18-2004, 07:23 PM | #1 |
Ok so I gave a hero the Reincarnate ability, now I have a trigger setup to give the hero +10 to stats everytime he reincarnates. However for whatever reason, the trigger won't work, I'm pretty sure this relates to Conditions/Events, also of note is only one hero has this ability so it shouldn't be doing it for/to other units. E:A unit owned by player8(Pink) finishes casting a ability C: Ability being cast equal to Reincarnate A: Modify strength/agility/intel +25 now that I think about it... it's probably more to do with the Event but any help is appreciated. |
| 04-18-2004, 07:52 PM | #2 |
First, this will probably be moved to trigger haven. Yeah, the problem is, the reincarnation doesn't trigger the "cast" events. Instead, there is supposedly some specific unit event - "unit's hp drop below 0", but I was just looking recently in my WE, trying to make a reincarnation based ability, and wasn't able to find it. So, if anyone knows how this is done, I'd like to know as well. |
| 04-18-2004, 08:10 PM | #3 |
i think that reincarnation is one of those things that cannot fire a trigger...same as critical strike :) as for your problem, i might suggest to create a unit array variable named "Reincarnator [Player Index]" and use it in the specific unit event.... that is all, hope it helps :) |
| 04-18-2004, 11:45 PM | #4 |
Anitar's suggestion is right, and I'm using it in a map successfully right now. However, it's an event for a specific unit, not a generic one, so if your unit isn't preplaced, you'll need to add an event to the trigger in-game (roughly Add Event "Trained Unit's hp goes below 0.00" to Trigger "Trigger name" where the Trained unit is your hero as it's trained for the first time, and Trigger name is the reincarnation trigger. If your reincarnation ability has a delay, you'll likely want to add a "Game - Wait ?.?? seconds" before adding the stat bonus. I apologize for the approximate wording, since I don't have the WE open at the moment. |
| 04-19-2004, 05:00 PM | #5 |
Yes, I have only now discovered this event, I did not originally find it because i was looking under "specific unit events", but in fast it was a seperate event alltogether, it is the "unit - life" event. However, testing this event in a seperate map has given me new insights, and questions. Apparently, judging from my observations, when a unit drops below 0 HP, the trigger is triggered 3 times. The test message I had was displayed that many times. The "generic unit event - unit dies" triggers before the "unit - life" event, as the test message I had in this trigger appeared right in front of the 3 test messages that appeared because of the life dropping below 0. Now, this would be all OK if it was always like this, but... it was nearly always. The first time a unit is killed, the triggers run a little different, and my testing this far has not been extensive enough to eliminate te reasonable doubt that this is so ONLY the first time a unit dies. So far, I have tested this on two heroes and one of them only displayed 2 "hp below zero" messages on his first death, and the other displayed 3 of those messages as it is usualy the case, but one of them was displayed BEFORE the "unit dies" message. Further testing of up to approximately 10 additional deaths gave the more regular results of a "unit death" message followed by 3 "unit life below 0" messages. Now, I will conduct further and more extensive testing of these triggers, but if anyone already has any ideas as to why this irregularity occurs, please post here. Edit: Further testing (with a 1000+dmg blademaster with 100% critical strike for faster hero killing :) ) with more heroes confirms that upon death, the "unit dies" triggers first, followed by three "unit's life becomes less than 0" events, EXCEPT the first time that hero dies (and, of course, except when the hero has a reincarnation, when only 3 life_below_0's trigger). On the first time the hero dies, there MAY be (not always) only 2 "life below 0" events, and the "unit dies" event MAY come AFTER the first "life below 0" event. To graphically show this: normaly you would get, upon hero death, event messages "X-Y-Y-Y", but on the first death of a hero, you get "X-Y-Y", or "Y-X-Y-Y", or "Y-X-Y". Still have no clue why, but I guess I will have to work around this. |
| 04-19-2004, 05:37 PM | #6 |
I sugges you simulate the reincarnation with triggers by using the unit dies event. In the trigger you can revive the hero instantly and increase the stats. |
| 04-19-2004, 05:48 PM | #7 |
but then you don't get the cooldown displayed on the reinc. ability. |
| 04-19-2004, 05:53 PM | #8 |
Thats right.....hadn't thought of that. Isn't ther a passive abillity with a cooldown as well? Then you make a dummy passive spell to show the cooldown. And I was thinking: Doesn't the event unit starts the effect of an abillity work? |
| 04-19-2004, 08:21 PM | #9 |
As said before, Reincarnation doesn't trigger any ability events. Begins casting, stops castin, finishes casting, starts the effect, they all don't work. The only way to detect this is to detect when the unit's HP drops below 0, but the unit doesn't die. With these events acting a little erratic (not easy to predict) on some occasions (the first time a hero dies), that is slightly difficult, but not imposible. Since I use a crude variable-array system for triggered spells in my map, I can work with these triggers easily because no matter in which order and how many times these events run, I can store info about that in the hero's variables and ignore non-standard event-triggering. |
| 04-20-2004, 05:11 PM | #10 |
Final update: after implementing the solutions from my test-map into my developing hero arena, further inconsistencies in the behavior of these events have been displayed. In the new map, the "unit hp below 0" event activates "only" twice. It still comes after the "unit dies" event, except on the first hero's death, when it's still mixed. Why any of this happens (multiple triggering, different order of events on first death) remains unknown. Individual testing and resilient triggering advised when implementing this in your maps. |
