• 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!

Angle damage variation

Status
Not open for further replies.
Level 11
Joined
May 26, 2009
Messages
760
Greetings,

I wonder if it's possible and if then someone could help me create a system where depending on which angle the target unit is attacked from different amount of damage will be dealt.

Basically I was only thinking of having "four angles" - 90 degrees each, plus some extra special effects. The angles are Front, Right side, Left side, Back. The image below shows what ratio the attack would have.

attachment.php


Depending on the unit different effects will take place at different angles. Each type of unit is a 'unique' case. In the Footman's case, his Defend will only work when attacked from the front and right. Also critical strikes and other passive abilities have an increased percentage of success when attacked from the back, we can call it 'backstab'.

Simply the first question is, is this possible in GUI?

Yours Truly,
Chizume
 

Attachments

  • angles.PNG
    angles.PNG
    84.3 KB · Views: 214
It is possible to determine the angle between attacker and target, and each unit's facing.

Getting critical strike's percentage chance to use that will be impossible unless you trigger critical strike (rather than using the ability). This will take an awful lot of trigger work though.

Someone had a nice trigger that worked better than mine using cosine and sine and all those old math terms... hopefully they can repaste it here. It was posted in the last few days in a thread in which someone had a few simple questions...one of which was about a backstab. I posted in it too, so you can search my name and find it probably.

I wouldn't recommend this if you're new; it'll be very hard.
 
Okay, thanks for the information.

What about a simplified version? A simple front and back system with double damage on the back and normal damage on the front, that can't be too many triggers, or? I'm not much of a triggerer, and I'm more looking for a simple solution rather than a challenge, and am willing to compromise. See image below for graphical visualization.
attachment.php
Yours,
Chizume
 

Attachments

  • angles.PNG
    angles.PNG
    297.8 KB · Views: 156
Moin moin =)

  • Untitled Trigger 001
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Real_3 = (Facing of Blood Mage 0001 <gen>)
      • Set Temp_Loc_3 = (Position of Blood Mage 0001 <gen>)
      • Set Temp_Loc_4 = (Position of Paladin 0000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Cos(((Temp_Real_3 - 45.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
        • Then - Actions
          • Game - Display to (All players) the text: Front Right
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Cos(((Temp_Real_3 + 45.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
            • Then - Actions
              • Game - Display to (All players) the text: Front Left
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Cos(((Temp_Real_3 - 135.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
                • Then - Actions
                  • Game - Display to (All players) the text: Back Right
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Cos(((Temp_Real_3 + 135.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
                    • Then - Actions
                      • Game - Display to (All players) the text: Back Left
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Cos(((Temp_Real_3 + 90.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
                        • Then - Actions
                          • Game - Display to (All players) the text: Front
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Cos(((Temp_Real_3 - 90.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
                            • Then - Actions
                              • Game - Display to (All players) the text: Back
                            • Else - Actions

maybe this will help you too ^^

Greetings
~ The Bomb King > Dr. Boom
 
you could use a simple trigger "unit is attacked -> make atacking unit damage atacked unit equal to "damage dealt" (freehanded)

You would need a Dmg detection system, but you can find on ready to be used here on hive.
 
Okay, thanks for the information.

What about a simplified version? A simple front and back system with double damage on the back and normal damage on the front, that can't be too many triggers, or? I'm not much of a triggerer, and I'm more looking for a simple solution rather than a challenge, and am willing to compromise. See image below for graphical visualization.
attachment.php
Yours,
Chizume

I would try to do it tomorrow HOPEFULLY before leaving to meh village and there is no internet :sad:
 
Status
Not open for further replies.
Back
Top