I'm sort of new to trigger spells, so I could use a little help on this one. I'm trying to make a bounty-type spell that places a bounty on an enemy Hero's head. It just gives bonus gold to the player that killed the Hero with a bounty on it. I've already got my Dummy Caster made, and I gave him these spells:
They're just the buffs for each level of the bounty spell. I have it so when the Hero casts Bounty on another Hero, it places one of those buffs on them (Depending on what level the Bounty skill is). I'm pretty sure everything there is working correctly, so it must be a problem with the triggers. I have a trigger called "Bounty" that orders the Dummy Caster to put the Bounty (1, 2, 3, or 4) buff on the target Hero when it is cast. This is what it looks like:
I based each of the Bounty buffs on different spells so hopefully the Dummy Caster would cast the correct buff. There's probably a flaw in that ^ trigger, or the next one I made.
This next trigger I made just tells the game to give bonus gold to the player who killed a Hero with a Bounty buff. I don't know if I did anything wrong in it, but somethings not working.
So after I made all that, I went into the game to test it out. When I casted Bounty on an enemy Hero, the buffs worked fine, but then when I killed him, I didnt get any bonus gold. In fact, I didnt get any gold.
So I guess my question here is: Why won't my Bounty spell work? Thank you VERY much to anyone who can help, and I'm sure there's plenty of people at this website who can!
-Bounty 1 (Based on Cripple)
-Bounty 2 (Based on Unholy Frenzy)
-Bounty 3 (Based on Bloodlust)
-Bounty 4 (Based on Curse)
They're just the buffs for each level of the bounty spell. I have it so when the Hero casts Bounty on another Hero, it places one of those buffs on them (Depending on what level the Bounty skill is). I'm pretty sure everything there is working correctly, so it must be a problem with the triggers. I have a trigger called "Bounty" that orders the Dummy Caster to put the Bounty (1, 2, 3, or 4) buff on the target Hero when it is cast. This is what it looks like:
Code:
"Bounty"
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Bounty
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Unit - Order Dummy Caster 0002 <gen> to Undead Necromancer - Cripple (Target unit of ability being cast)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Bounty for (Triggering unit)) Equal to 2
Then - Actions
Unit - Order Dummy Caster 0002 <gen> to Undead Necromancer - Unholy Frenzy (Target unit of ability being cast)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Bounty for (Triggering unit)) Equal to 3
Then - Actions
Unit - Order Dummy Caster 0002 <gen> to Orc Shaman - Bloodlust (Target unit of ability being cast)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Bounty for (Triggering unit)) Equal to 4
Then - Actions
Unit - Order Dummy Caster 0002 <gen> to Undead Banshee - Curse (Target unit of ability being cast)
Else - Actions
Do nothing
I based each of the Bounty buffs on different spells so hopefully the Dummy Caster would cast the correct buff. There's probably a flaw in that ^ trigger, or the next one I made.
This next trigger I made just tells the game to give bonus gold to the player who killed a Hero with a Bounty buff. I don't know if I did anything wrong in it, but somethings not working.
Code:
"BountyKill"
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Bounty 1 ) Equal to True
Then - Actions
Player - Add 200 to (Owner of (Killing unit)) Current gold
Animation - Play (Killing unit)'s victory animation
Special Effect - Create a special effect attached to the overhead of (Killing unit) using UI\Feedback\GoldCredit\GoldCredit.mdl
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Bounty 2 ) Equal to True
Then - Actions
Player - Add 350 to (Owner of (Killing unit)) Current gold
Animation - Play (Killing unit)'s victory animation
Special Effect - Create a special effect attached to the overhead of (Killing unit) using UI\Feedback\GoldCredit\GoldCredit.mdl
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Bounty 3 ) Equal to True
Then - Actions
Player - Add 500 to (Owner of (Killing unit)) Current gold
Animation - Play (Killing unit)'s victory animation
Special Effect - Create a special effect attached to the overhead of (Killing unit) using UI\Feedback\GoldCredit\GoldCredit.mdl
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Bounty 4 ) Equal to True
Then - Actions
Player - Add 750 to (Owner of (Killing unit)) Current gold
Animation - Play (Killing unit)'s victory animation
Special Effect - Create a special effect attached to the overhead of (Killing unit) using UI\Feedback\GoldCredit\GoldCredit.mdl
Else - Actions
Do nothing
So after I made all that, I went into the game to test it out. When I casted Bounty on an enemy Hero, the buffs worked fine, but then when I killed him, I didnt get any bonus gold. In fact, I didnt get any gold.
So I guess my question here is: Why won't my Bounty spell work? Thank you VERY much to anyone who can help, and I'm sure there's plenty of people at this website who can!