• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Backstab really easy method

Status
Not open for further replies.
Level 11
Joined
Mar 8, 2006
Messages
277
  • Event:
    • Unit - A unit is attacked
  • Conditions:
    • Facing of the Attacker greater then 44 and Facing Of the Attacker less then 136
    • Facing of the Attacked greater then 44 and Facing Of the Attacked less then 136
  • Actions:
    • What actions u like.
Note: I tryed it with chat message diddnt set the event to A unit is attacked but it works and is realy easy to make it.
Maybe the angle needs to be adjusted a little bit.
 
Last edited:
  • Event:
    • Unit - A unit is attacked
  • Conditions:
    • Facing of the Attacker greater then 44 and Facing Of the Attacker less then 136
    • Facing of the Attacked greater then 44 and Facing Of the Attacked less then 136
  • Actions:
    • What actions u like.

Seriously, learn the difference between "then" and "than" :)

The trigger won't work correctly for all cases, that's for sure.
 
Ive said is a really easy and fast method to make, and a fast and easy method may have bugs, but is better than nothing.
But there are better methods than this which involves finding the difference of angles: Difference between angles Although your method may be fast and easy, it would be wiser to choose a method that works in all cases.

Example of a backstab condition using angle difference:
  • (Acos((Cos(((Facing of (Triggering unit)) - (Facing of (Attacking unit))))))) Less than or equal to 90.00
90.0 is the value allowed for angle deviation. Lower values would make it harder to backstab.
 
Example of a backstab condition using angle difference:
  • (Acos((Cos(((Facing of (Triggering unit)) - (Facing of (Attacking unit))))))) Less than or equal to 90.00
90.0 is the value allowed for angle deviation. Lower values would make it harder to backstab.[/QUOTE]

Is this the whole thing or is more coz i used it and it didnt metter if i was attacking from the front or back, it was the same thing, why?
 
Is this the whole thing or is more coz i used it and it didnt metter if i was attacking from the front or back, it was the same thing, why?
That's the whole thing.
90 was probably too big of a value. It would probably be better to use something smaller.
The facing of the attacking unit might also contribute to the problem since it takes time for the attacker to face the unit.
 
Status
Not open for further replies.
Back
Top