• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trying to Make Backstab Damage...

Status
Not open for further replies.
Level 6
Joined
Mar 29, 2004
Messages
222
I am trying to make it so when a unit attacks another unit from behind, that attacked unit is dealt extra damage. i lack a correct trigger to do so, but here it my trigger right now...


Backstab Damage
Events
Unit - A unit Is attacked
Conditions
(Min(((Integer((Facing of (Attacked unit)))) - 20), ((Integer((Facing of (Attacked unit)))) + 20))) Equal to (Integer((Facing of (Attacking unit)))
Actions
Special Effect - Create a special effect attached to the chest of (Attacked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) - 100.00)

I believe the Condition is incorrect, so what would be the right one?
One more thing, the attacking unit should not have to be directly on the back of a unit to deal Backstab damage, it should just be around the general area...
 
Level 13
Joined
Dec 29, 2004
Messages
597
Shamanruler said:
I am trying to make it so when a unit attacks another unit from behind, that attacked unit is dealt extra damage. i lack a correct trigger to do so, but here it my trigger right now...


Backstab Damage
Events
Unit - A unit Is attacked
Conditions
(Min(((Integer((Facing of (Attacked unit)))) - 20), ((Integer((Facing of (Attacked unit)))) + 20))) Equal to (Integer((Facing of (Attacking unit)))
Actions
Special Effect - Create a special effect attached to the chest of (Attacked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) - 100.00)

I believe the Condition is incorrect, so what would be the right one?

Leopard:
Hmm, with that condition the attacking unit will deal backstab damage if only it's exactly at behind of attacked unit. I suggest that you use degree comparison that compare facing degree of attacking unit and attacked unit are "equal". I mean greater than (facing attacked - 20) and less than (facing attacked + 20). Note that u must check that attacking unit has "backstab" ability, or every unit that attack from behind will do the same.

One more thing, the attacking unit should not have to be directly on the back of a unit to deal Backstab damage, it should just be around the general area...

Leopard:
Hmm, with that condition the attacking unit will deal backstab damage if only it's exactly at behind of attacked unit. I suggest that you use degree comparison that compare facing degree of attacking unit and attacked unit are "equal". I mean greater than (facing attacked - 20) and less than (facing attacked + 20). Note that u must check that attacking unit has "backstab" ability, or every unit that attack from behind will do the same.

and remember this, DON'T USE "SET LIFE" IN YOUR SPELL TRIGGER. it will just set its life, not attacked by the caster, so the caster wouldn't get the bounty if it dies. USE "DAMAGE TARGET" from unit category in trigger editor.

I hope it will be help...

--------------------------------
Download my map : Ultimate3Corridors: Classic v5.0
on Offense category. Sorry cannot provide a link.
--Leopard--
 
Status
Not open for further replies.
Top