• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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