- Joined
- Mar 3, 2009
- Messages
- 327
For some reason ranged units are stuffing up my damage detection things.
Heres how it works. On init every unit is given the "Attack" ability, based off the orb of corruption. They also get it whenever they enter the map. Because I have my ways, I know these parts arent the ones bugging so i wont upload them.
When they get the attack ability they also get added to the DD trigger. Here it is now:
The bugs:
Ranged enemies (2 different types are all ive tested, most likely there are more) hits are being detected as both "Having" and "not having" the attacked buff, resulting in a red and a blue hitsplat at the same time. Also, the buff DEFINITELY gets applied for them, because I set the duration to 5 seconds or so and mopved my guy into the middle of a herd of centaur. Please dont suggest this >_>
Hero spells (Havn't tested any non-hero spells) are not having their damage detected at all.
Everyone that replies with a reasonable attempt at fixing this will have their efforts recognized. Thank you all, even if all you did was read this
Please tell me if more information is required.
Heres how it works. On init every unit is given the "Attack" ability, based off the orb of corruption. They also get it whenever they enter the map. Because I have my ways, I know these parts arent the ones bugging so i wont upload them.
When they get the attack ability they also get added to the DD trigger. Here it is now:
-
DD crit miss gore pillage and sappers by GoGo
-
Events
-
Conditions
-
Actions
-
Set Temppoint[0] = (Position of (Damage source))
-
Set Temppoint[1] = (Position of (Triggering unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Damage source) is A Hero) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) is A structure) Equal to False
-
((Triggering unit) has buff Attacked ) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Facing of (Triggering unit)) - (Angle from Temppoint[1] to Temppoint[0])) Less than AngleStart[0]
-
((Facing of (Triggering unit)) - (Angle from Temppoint[1] to Temppoint[0])) Greater than AngleEnd[0]
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Custom value of (Triggering unit)) Equal to 0
-
-
Then - Actions
-
Unit - Set the custom value of (Triggering unit) to 1
-
Floating Text - Create floating text that reads (String((Integer(((Damage taken) x 2.00))))) at Temppoint[1] with Z offset 0.00, using font size 9.00, color (80.00%, 0.00%, 0.00%), and 25.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards (Angle from Temppoint[0] to Temppoint[1]) degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
Floating Text - Create floating text that reads Backstabtext[(Random integer number between 0 and 3)] at Temppoint[0] with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Cause (Damage source) to damage (Triggering unit), dealing (Damage taken) damage of attack type Chaos and damage type Universal
-
-
Else - Actions
-
Unit - Set the custom value of (Triggering unit) to 0
-
-
-
-
Else - Actions
-
Set Tempint = (Agility of (Damage source) (Include bonuses))
-
Set Tempint2 = (((Level of (Triggering unit)) x 10) + 5)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random real number between 0.00 and 100.00) Less than or equal to (100.00 x ((Real(Tempint)) / (Square root((Real(((Tempint x Tempint) + (Tempint2 x Tempint2))))))))
-
-
Then - Actions
-
Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at Temppoint[1] with Z offset 0.00, using font size 7.50, color (80.00%, 0.00%, 0.00%), and 25.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards (Angle from Temppoint[0] to Temppoint[1]) degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 5) Equal to 1
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-
Else - Actions
-
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
-
Floating Text - Create floating text that reads Misstext[(Random integer number between 0 and 5)] at Temppoint[0] with Z offset 0.00, using font size 8.00, color (80.00%, 0.00%, 0.00%), and 25.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
-
-
-
-
-
Else - Actions
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) has buff Attacked ) Equal to True
-
-
Then - Actions
-
Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at Temppoint[1] with Z offset 0.00, using font size 7.50, color (80.00%, 0.00%, 0.00%), and 25.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards (Angle from Temppoint[0] to Temppoint[1]) degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 5) Equal to 1
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-
Else - Actions
-
Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at Temppoint[1] with Z offset 0.00, using font size 7.50, color (0.00%, 0.00%, 80.00%), and 25.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards (Angle from Temppoint[0] to Temppoint[1]) degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 5) Equal to 1
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-
-
-
-
Custom script: call RemoveLocation(udg_Temppoint[0])
-
Custom script: call RemoveLocation(udg_Temppoint[1])
-
-
-
|
-
|
-
|
-
THESE ARE ALL RELATED TO OTHER SYSTEMS
-
|
-
|
-
|
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) has buff Attacked ) Equal to True
-
((Damage source) has buff Pillage ) Equal to True
-
-
Then - Actions
-
Player - Add (Level of Pillage for (Damage source)) to (Owner of (Damage source)) Current gold
-
Set Temppoint[0] = (Position of (Damage source))
-
Floating Text - Create floating text that reads (+ + (String((Level of Pillage for (Damage source))))) at Temppoint[0] with Z offset 14.00, using font size 9.00, color (80.00%, 80.00%, 0.00%), and 25.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
Custom script: call RemoveLocation(udg_Temppoint[0])
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Kobold Sapper
-
(Random integer number between 1 and 3) Equal to 1
-
-
Then - Actions
-
Wait 0.01 seconds
-
Set Temppoint[0] = (Position of (Triggering unit))
-
Special Effect - Create a special effect at Temppoint[0] using war3mapImported\ExplosionBIG.mdx
-
Special Effect - Destroy (Last created special effect)
-
Unit - Cause (Damage source) to damage circular area after 0.00 seconds of radius 300.00 at Temppoint[0], dealing 200.00 damage of attack type Chaos and damage type Normal
-
Custom script: call RemoveLocation(udg_Temppoint[0])
-
Unit - Remove (Triggering unit) from the game
-
-
Else - Actions
-
-
The bugs:
Ranged enemies (2 different types are all ive tested, most likely there are more) hits are being detected as both "Having" and "not having" the attacked buff, resulting in a red and a blue hitsplat at the same time. Also, the buff DEFINITELY gets applied for them, because I set the duration to 5 seconds or so and mopved my guy into the middle of a herd of centaur. Please dont suggest this >_>
Hero spells (Havn't tested any non-hero spells) are not having their damage detected at all.
Everyone that replies with a reasonable attempt at fixing this will have their efforts recognized. Thank you all, even if all you did was read this
Please tell me if more information is required.