Hey guys!
When I was working on my Bounty Hunter hero I ran into some problems in one of his triggers, Assassinate. It's a pretty easy ability. You deal damage, if target dies, you move to target unit's location.
However, I decided to spice it up a bit, so I mixed in some synergy with his first spell, Bounty scan, which added random units from an area to a unit group (Unit_Group_Bounty_Scan) and then awarded you extra gold if you killed units from this unit group with assassinate.
The problem:
-If you kill an ordinary unit with this ability, it works exactly as intended.
-BUT if you kill an unit from the unit group "Bounty scan", you won't move to the targets location.
I've been trying to get it working, but it just won't. Don't have any clue of what might cause this problem either, heck, I even gain the extra gold from the kill and the floating text appears! From what I know, the other triggers aren't the problem either... But I can post them too if needed.
Any help is greatly appreciated!
When I was working on my Bounty Hunter hero I ran into some problems in one of his triggers, Assassinate. It's a pretty easy ability. You deal damage, if target dies, you move to target unit's location.
However, I decided to spice it up a bit, so I mixed in some synergy with his first spell, Bounty scan, which added random units from an area to a unit group (Unit_Group_Bounty_Scan) and then awarded you extra gold if you killed units from this unit group with assassinate.
The problem:
-If you kill an ordinary unit with this ability, it works exactly as intended.
-BUT if you kill an unit from the unit group "Bounty scan", you won't move to the targets location.
I've been trying to get it working, but it just won't. Don't have any clue of what might cause this problem either, heck, I even gain the extra gold from the kill and the floating text appears! From what I know, the other triggers aren't the problem either... But I can post them too if needed.
Any help is greatly appreciated!

-
Assassinate
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Assassinate
-
(Level of Assassinate for (Triggering unit)) Not equal to 0
-
-
Actions
-
-------- - --------
-
-------- Variables --------
-
-------- - --------
-
Set Casting_Unit = (Triggering unit)
-
Set Target_Unit = (Target unit of ability being cast)
-
Set Spell_Level = (Level of Assassinate for Casting_Unit)
-
Set Loc[1] = (Position of Target_Unit)
-
Set Damage_Primary = (75 x Spell_Level)
-
-------- Damage secondary is the amount of extra gold bounty the player will be awarded if he kills the target with assassinate. --------
-
Set Damage_Secondary = (((Owner of Casting_Unit) Current gold) + (5 x Spell_Level))
-
-------- - --------
-
-------- If target is Allied. --------
-
-------- - --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Target_Unit belongs to an enemy of (Owner of Casting_Unit)) Equal to False
-
-
Then - Actions
-
Unit - Move Casting_Unit instantly to Loc[1]
-
-
Else - Actions
-
-
-------- - --------
-
-------- Hostile --------
-
-------- - --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Target_Unit belongs to an enemy of (Owner of Casting_Unit)) Equal to True
-
-
Then - Actions
-
-------- - --------
-
-------- Damage --------
-
-------- - --------
-
Unit - Cause Casting_Unit to damage Target_Unit, dealing (Real(Damage_Primary)) damage of attack type Normal and damage type Normal
-
-------- - --------
-
-------- - --------
-
Special Effect - Create a special effect at Loc[1] using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect at Loc[1] using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- - --------
-
-------- - --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Target_Unit is dead) Equal to True
-
-
Then - Actions
-
Unit - Move Casting_Unit instantly to Loc[1]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Target_Unit is in Unit_Group_Bounty_Scan[1]) Equal to True
-
(Target_Unit is in Unit_Group_Bounty_Scan[2]) Equal to True
-
(Target_Unit is in Unit_Group_Bounty_Scan[3]) Equal to True
-
(Target_Unit is in Unit_Group_Bounty_Scan[4]) Equal to True
-
(Target_Unit is in Unit_Group_Bounty_Scan[5]) Equal to True
-
-
-
-
Then - Actions
-
Player - Set (Owner of Casting_Unit) Current gold to Damage_Secondary
-
-------- - --------
-
Floating Text - Create floating text that reads (String((5 x Spell_Level))) above Target_Unit with Z offset 0.00, using font size 10.00, color (0.00%, 75.00%, 75.00%), and 0.00% transparency
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
-
-------- - --------
-
Special Effect - Create a special effect at Loc[1] using Abilities\Spells\Other\Transmute\PileofGold.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-------- - --------
-
-------- Clean-up --------
-
-------- - --------
-
Set Casting_Unit = No unit
-
Set Target_Unit = No unit
-
Set Spell_Level = 0
-
Set Damage_Primary = 0
-
Set Damage_Secondary = 0
-
Custom script: call RemoveLocation(udg_Loc[1])
-
-