I am making a purchasable 'Explosive Arrow' spell item. When used it blows up on units upon their death, exploding them in blood and guts. However, that's the problem. The Event - A Unit Dies is too overgeneralizing. Therefore, instead of just the Explosive Arrow doing the exploding, every other spell explodes on/at the origin of a dying unit/player too.
It looks like this ball of fun in this HD YouTube video at: http://www.youtube.com/watch?v=N6xB7_xIYd8&feature=youtube_gdata
Here are the original triggers (the ones used to showcase the spell):
And here is one of the recommended suggestions someone here made for the fix:
The above still doesn't work . . .
MINUS the abilities Event and the abilities condition and this works, of course. For some reason it won't bring the two events and conditions together so if a unit dies to the item being used, the explosion will trigger for the Explosive Arrow item only.
Furthermore what I need help figuring out is how to calculate the damage output of the Explosive Arrow item spell so that any other spell doing less damage than the Explosive Arrow doesn't explode on a unit's death. The Explosive Arrow does the maximum amount of damage possible in the Object Editor.
Relying on the Event - A Unit Dies is essential to me because it's guaranteed the animations, etc. will always trigger at/on the origin of a dying player. This does away with having to use a dummy unit and using 50-100+ lines of code.
What I need is an ingenious work-around to have the A Unit Dies event mitigated to only trigger with the Explosive Arrow item spell. There has to be a way.
P.S. I've looked and looked at other projectile systems, etc. and they either 1. Don't work 2. Have issues or leak really badly 3. Are not up-to-par with the best methods (not that mine really are either, I'm an ideas man) 4. They don't meet the exact caliber of my idea here.
It looks like this ball of fun in this HD YouTube video at: http://www.youtube.com/watch?v=N6xB7_xIYd8&feature=youtube_gdata
Here are the original triggers (the ones used to showcase the spell):
-
Exploding Arrow
-
Events
- Unit - A unit Begins casting an ability
- Unit - A unit Dies
-
Conditions
- (((Dying unit) is A Hero) Equal to True) and ((Ability being cast) Equal to Exploding Arrow )
-
Actions
- Special Effect - Create a special effect attached to the origin of (Dying unit) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the origin of (Dying unit) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
- Special Effect - Destroy (Last created special effect)
-
Events
-
Exploding Arrow
-
Events
- Unit - A unit Begins casting an ability / I even tried: Unit - A unit Uses an item
- Unit - A unit Dies
-
Conditions
- ((Triggering unit) is A Hero) Equal to True
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Exploding Arrow / I even tried: (Item-type of (Item being manipulated)) Equal to Exploding Arrow
-
Then - Actions
- Special Effect - Create a special effect attached to the origin of (Dying unit) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the origin of (Dying unit) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
MINUS the abilities Event and the abilities condition and this works, of course. For some reason it won't bring the two events and conditions together so if a unit dies to the item being used, the explosion will trigger for the Explosive Arrow item only.
Furthermore what I need help figuring out is how to calculate the damage output of the Explosive Arrow item spell so that any other spell doing less damage than the Explosive Arrow doesn't explode on a unit's death. The Explosive Arrow does the maximum amount of damage possible in the Object Editor.
Relying on the Event - A Unit Dies is essential to me because it's guaranteed the animations, etc. will always trigger at/on the origin of a dying player. This does away with having to use a dummy unit and using 50-100+ lines of code.
What I need is an ingenious work-around to have the A Unit Dies event mitigated to only trigger with the Explosive Arrow item spell. There has to be a way.
P.S. I've looked and looked at other projectile systems, etc. and they either 1. Don't work 2. Have issues or leak really badly 3. Are not up-to-par with the best methods (not that mine really are either, I'm an ideas man) 4. They don't meet the exact caliber of my idea here.
Last edited: