| 04-25-2010, 06:37 PM | #1 |
I have a spell I've worked on for a map, called Deathmark. It's meant to use a dummy version of Acid Bomb, and I created a trigger around it. I would post the trigger if I knew how (help, please?), but it works along the way of noticing the cast, setting target to a variable and the caster to another variable, and then set the mana of DeathmarkCaster to (current mana)+(50). But it doesn't seem to work as well as I would like it, and it can't notice the "A unit Dies" event, with the condition "Dying unit Equals to DeathmarkTarget, even though the target clearly is set to the variable (since the other functions of a second trigger, that continuosly creates effects on DeathmarkTarget, work fine). So, my problem is starting the trigger. I know, the information may be a little tangled, but I'm not sure on how to post it so you can see for yourselves, and explaining a trigger in text is not the easiest thing. All help would be appreciated. |
| 04-25-2010, 08:05 PM | #2 |
To copy the trigger onto here, right click it and select "Copy as Text". Then past it in [GUI] tags in the forum (I'm assuming you're using GUI here...). About your problem, it seems that it lies within your death event. Events and their conditions for the most part are created during map initialization, so when your condition says "Dying unit equals to deathmark target" it actually means "Dying unit equals to deathmark target, but whatever the value was during map initialization (which most likely is null)." I'm guessing an alternative to your spell is to give the unit a buff, and detect if the unit has the buff or not upon death. |
| 04-25-2010, 08:16 PM | #4 | |
Quote:
Edit: your problem is that you set the caster variable to "no unit" before you restore that unit's mana. |
| 04-25-2010, 08:27 PM | #5 | |
Quote:
Oh, my ignorant stupidity shines through. I just checked it, and it works wonders. Have been pulling my hair (almost) over this trigger, and it turns out to such a simple little mistake. Many thanks! |
| 04-26-2010, 01:08 AM | #6 | |
Quote:
|
