• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

How to make inverted backstab?

Status
Not open for further replies.
Level 9
Joined
Mar 17, 2016
Messages
144
Hi, I want to make a skill like Rikis Backstab from dota 2, but instead of the back it would do the effect if the attacking unit is striking from the front.

What I know so far is to have a damage detection trigger, condition "if unit has buff", then I have this

  • Then - Actions
    • Set VariableSet Backstab_Point[3] = (Position of UnitPlayerCaster[14])
    • Set VariableSet Backstab_Point[4] = (Position of AbilTargetUnit[3])
    • Set VariableSet Backstab_Angle = (Angle from Backstab_Point[3] to Backstab_Point[4])
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • And - All (Conditions) are true
              • Conditions
                • (Facing of UnitPlayerCaster[14]) Greater than or equal to ((Facing of AbilTargetUnit[3]) - 240.00)
                • (Facing of UnitPlayerCaster[14]) Less than or equal to ((Facing of AbilTargetUnit[3]) + 240.00)
            • And - All (Conditions) are true
              • Conditions
                • Backstab_Angle Greater than or equal to ((Facing of AbilTargetUnit[3]) - 240.00)
                • Backstab_Angle Less than or equal to ((Facing of AbilTargetUnit[3]) + 240.00)
      • Then - Actions
        • Game - Display to (All players) the text: step 3 - damage
        • Unit - Cause UnitPlayerCaster[14] to damage AbilTargetUnit[3], dealing 5 damage of attack type Hero and damage type Normal
      • Else - Actions
I've tried rotating and shifting the numbers that calculate the locations but I can't seem to make it work from the front, only varying degrees from the back and that's not what this hero will be about. I know that I must be missing something and I'm hoping someone can identify the issue, because I've ran out of ideas.


Thanks!
 
Last edited:
Status
Not open for further replies.
Top