| 06-15-2005, 08:59 PM | #1 |
Ever have a problem in a map, where a object will only load when it wants to, or a trigger will only work when it wants to, for example a trigger I have is supposed to be when a hero defeats another player in a 1vs1 duel, move the Winner and the revive triggers will take care of the Loser. Well, for me it only seems to work once in a while. Code:
Duel Over
Events
Unit - A unit Dies
Conditions
(((Dying unit) is in (Units in Duel1 <gen>)) Equal to True) or (((Dying unit) is in (Units in Duel2 <gen>)) Equal to True)
((Dying unit) is A Hero) Equal to True
Actions
Unit - Move (Killing unit) instantly to (Center of Hero <gen>)
Game - Display to (All players) for 30.00 seconds the text: ((Name of (Owner of (Killing unit))) + ( has beaten + ((Name of (Owner of (Dying unit))) + in a duel.)))
Unit Group - Pick every unit in (Units in Duel1 <gen>) and do (Unit - Kill (Triggering unit))Help please? |
| 06-15-2005, 09:37 PM | #2 |
Are you sure the killing unit is the other hero? The killing unit could also be a summoned unit, or a dummy caster... :/ |
| 06-15-2005, 09:45 PM | #3 |
That trigger alone I can see having leaks. But like the Wise Anitarf said, The killing unit could also be a summoned unit, or a dummy caster. |
| 06-17-2005, 12:07 AM | #4 |
actually no. since he has the condition that the unit must be a hero it cannot be that. However, looking at the second part of the trigger: Unit Group - Pick every unit in (Units in Duel1 <gen>) and do (Unit - Kill (Triggering unit)) I dont know which units you have in that group... but Unit - Kill (Triggering unit) will do not much here ;). Try picked unit. |
| 06-17-2005, 07:40 AM | #5 | |
Quote:
Try the following: instead of moving the killing unit, put an if statement in your pick-all-units loop that checks if the picked unit is a hero and it belongs to the owner of killing unit (and also check that it's not an illusion, if you have mirror image or wands of illusion on your map), then move it, otherwise kill it. That way, even if it's a summoned unit that lands the finishing blow, it will be the hero that gets teleported back. |
| 06-17-2005, 02:49 PM | #6 |
Hey thanks, never thought of when the summons kill the hero. But still on the subject, I've had where certain objects only load sometimes. |
| 06-17-2005, 02:53 PM | #7 | |
Quote:
Thanks, another bug that is, its supposed to say Picked Unit. Its supposed to clear all the summons out once the 1vs1 duel is complete. I should add so killing unit gets full health also. |
