- Joined
- Feb 9, 2009
- Messages
- 1,787
I want to replicate Teeth from Diablo 2
however as it stands you can pretty reliably shotgun units with 90% of missiles for ludicrous damage,
I like it but someone who wants stats from diablo 2 won't.
For those who are unaware, teeth fires a fan of projectiles towards a target location, the closer your cast point is the larger the spread of missiles will be, and the opposite will converge them onto a point, only one missile per cast can effect a unit.
I need to be able to exclude a unit from being hit after one projectile but not so immune that future waves or allied waves get caught in this exclusion, How would I achieve this?
From what I understand the options are:
- Unit Group
- Hashtable
Buff tagging is straight out of the question as ignoring units with a buff will simply result in invincibility frames where an ally could have their cast nullified by converging on their ally's earlier cast.
Secondly, I'm pretty sure there are leaks but I can't seem to find them, casting for a decent amount of time doesn't lag but upon exiting it will take some time depending on how many casts you've done.
I'd love some second set of eyes if i'm doing something wrong.
Triggers:
Lastly here's a video example
Video example:
however as it stands you can pretty reliably shotgun units with 90% of missiles for ludicrous damage,
I like it but someone who wants stats from diablo 2 won't.
For those who are unaware, teeth fires a fan of projectiles towards a target location, the closer your cast point is the larger the spread of missiles will be, and the opposite will converge them onto a point, only one missile per cast can effect a unit.
I need to be able to exclude a unit from being hit after one projectile but not so immune that future waves or allied waves get caught in this exclusion, How would I achieve this?
From what I understand the options are:
- Unit Group
- Hashtable
Buff tagging is straight out of the question as ignoring units with a buff will simply result in invincibility frames where an ally could have their cast nullified by converging on their ally's earlier cast.
Secondly, I'm pretty sure there are leaks but I can't seem to find them, casting for a decent amount of time doesn't lag but upon exiting it will take some time depending on how many casts you've done.
I'd love some second set of eyes if i'm doing something wrong.
Triggers:
-
TeNe Config
-
Events
- Map initialization
- Conditions
-
Actions
- Set TeNe_Ability[1] = Teeth
- Set TeNe_Stats_Speed = 20.00
- Set TeNe_Stats_Spread = 270.00
- Set TeNe_Stats_Count = 5
- Set TeNe_Stats_Count_PerLVL = 5
- Set TeNe_Stats_DMG_Ratio[1] = 0.15
- Set TeNe_Stats_DMG_Ratio_PerLVL[1] = 0.10
- Set TeNe_Stats_Crit_Percentage[1] = 2.00
- Set TeNe_Stats_Crit_Chance[1] = 0.01
- Set TeNe_EffectPath[1] = Abilities\Weapons\SkeletalMageMissile\SkeletalMageMissile.mdl
- Set TeNe_EffectPath[2] = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Events
-
TeNe Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to TeNe_Ability[1]
-
Actions
- -------- ============================= --------
- -------- Store the necessary values --------
- -------- ============================= --------
-
For each (Integer TeNe_Cast_LOOP) from 1 to (TeNe_Stats_Count + (TeNe_Stats_Count_PerLVL x (Level of TeNe_Ability[1] for (Triggering unit)))), do (Actions)
-
Loop - Actions
- Set TeNe_Index = (TeNe_Index + 1)
- Set TeNe_Caster[TeNe_Index] = (Triggering unit)
- Set TeNe_Point[1] = (Position of TeNe_Caster[TeNe_Index])
- Set TeNe_Point[2] = (Target point of ability being cast)
- Set TeNe_Point[3] = (TeNe_Point[1] offset by 25.00 towards (Angle from TeNe_Point[2] to TeNe_Point[1]) degrees)
- Set TeNe_Point[4] = (TeNe_Point[3] offset by ((TeNe_Stats_Spread x 0.50) - ((TeNe_Stats_Spread / (Real(((TeNe_Stats_Count + (TeNe_Stats_Count_PerLVL x (Level of TeNe_Ability[1] for TeNe_Caster[TeNe_Index]))) + 1)))) x (Real(TeNe_Cast_LOOP)))) towards ((Angle from TeNe_Point[2] to)
- -------- ============================= --------
- -------- Create the dummy --------
- -------- ============================= --------
- Special Effect - Create a special effect at TeNe_Point[4] using TeNe_EffectPath[1]
- Special Effect - Set Yaw of (Last created special effect) to: (Radians((Angle from TeNe_Point[3] to TeNe_Point[2])))
- Set TeNe_Effect[TeNe_Index] = (Last created special effect)
- Set TeNe_Height[TeNe_Index] = (Current flying height of TeNe_Caster[TeNe_Index])
- Set TeNe_Facing[TeNe_Index] = (Angle from TeNe_Point[4] to TeNe_Point[2])
- Set TeNe_Distance[TeNe_Index] = 1500.00
- -------- ============================= --------
- -------- Move on to the looping part --------
- -------- ============================= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TeNe_Index Equal to 1
-
Then - Actions
- Trigger - Turn on Tene Periodic <gen>
- Else - Actions
-
If - Conditions
- -------- ============================= --------
- -------- Clean up the leaks --------
- -------- ============================= --------
- Custom script: call RemoveLocation(udg_TeNe_Point[1])
- Custom script: call RemoveLocation(udg_TeNe_Point[2])
- Custom script: call RemoveLocation(udg_TeNe_Point[3])
-
Loop - Actions
-
Events
-
Tene Periodic
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer TeNe_Loop) from 1 to TeNe_Index, do (Actions)
-
Loop - Actions
- -------- ============================= --------
- -------- Store the necessary values --------
- -------- ============================= --------
- Set TeNe_Point[4] = (Point((Position - X of TeNe_Effect[TeNe_Loop]), (Position - Y of TeNe_Effect[TeNe_Loop])))
- -------- ============================= --------
- -------- Move the missile dummy --------
- -------- ============================= --------
- Set TeNe_Point[5] = (TeNe_Point[4] offset by TeNe_Stats_Speed towards TeNe_Facing[TeNe_Loop] degrees)
- Set TeNe_Facing[TeNe_Loop] = (Angle from TeNe_Point[4] to TeNe_Point[5])
- Custom script: set udg_TeNe_C_Height = GetLocationZ(udg_TeNe_Point[4])
- Special Effect - Set Position of TeNe_Effect[TeNe_Loop] to x: (X of TeNe_Point[5]), y: (Y of TeNe_Point[5]), z: (TeNe_C_Height + 65.00)
- Special Effect - Set Yaw of TeNe_Effect[TeNe_Loop] to: (Radians(TeNe_Facing[TeNe_Loop]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- TeNe_Distance[TeNe_Loop] Less than or equal to 0.00
- (Terrain pathing at TeNe_Point[4] of type Walkability is off) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
-
Then - Actions
- -------- ============================= --------
- Special Effect - Destroy TeNe_Effect[TeNe_Loop]
- Set TeNe_Facing[TeNe_Loop] = 0.00
- -------- ============================= --------
- Set TeNe_Caster[TeNe_Loop] = TeNe_Caster[TeNe_Index]
- Set TeNe_Effect[TeNe_Loop] = TeNe_Effect[TeNe_Index]
- Set TeNe_Height[TeNe_Loop] = TeNe_Height[TeNe_Index]
- Set TeNe_Facing[TeNe_Loop] = TeNe_Facing[TeNe_Index]
- Set TeNe_Distance[TeNe_Loop] = TeNe_Distance[TeNe_Index]
- Set TeNe_Distance[TeNe_Loop] = TeNe_Distance[TeNe_Index]
- Set TeNe_Loop = (TeNe_Loop - 1)
- Set TeNe_Index = (TeNe_Index - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TeNe_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Set TeNe_Distance[TeNe_Loop] = (TeNe_Distance[TeNe_Loop] - TeNe_Stats_Speed)
- -------- ============================= --------
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 50.00 of TeNe_Point[4]) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- ((Picked unit) is A structure) Equal to True
- ((Picked unit) is Magic Immune) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set TeNe_Distance[TeNe_Loop] = 0.00
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is alive) Equal to True
- ((Picked unit) belongs to an enemy of (Owner of TeNe_Caster[TeNe_Loop])) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
-
Then - Actions
- Set TeNe_Distance[TeNe_Loop] = 0.00
- Set TeNe_Point[6] = (Position of (Picked unit))
- -------- ============================= --------
- Set TeNe_Integer[1] = (Base Damage of TeNe_Caster[TeNe_Loop] for weapon index 0)
- Set TeNe_Integer[2] = (Dice Number of TeNe_Caster[TeNe_Loop] for weapon index 0)
- Set TeNe_Integer[3] = (Dice Sides of TeNe_Caster[TeNe_Loop] for weapon index 0)
- Set TeNe_Integer[4] = (Random integer number between (TeNe_Integer[1] + TeNe_Integer[2]) and (TeNe_Integer[1] + (TeNe_Integer[2] x TeNe_Integer[3])))
- Set TeNe_Real[1] = ((Real(TeNe_Integer[4])) x (TeNe_Stats_DMG_Ratio[1] + (TeNe_Stats_DMG_Ratio_PerLVL[1] x (Real((Level of TeNe_Ability[1] for TeNe_Caster[TeNe_Loop]))))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random real number between 0.01 and 1.00) Less than or equal to TeNe_Stats_Crit_Chance[1]
-
Then - Actions
- Set TeNe_Real[1] = (TeNe_Real[1] x TeNe_Stats_Crit_Percentage[1])
- Special Effect - Create a special effect attached to the chest of (Picked unit) using TeNe_EffectPath[2]
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
- Unit - Cause TeNe_Caster[TeNe_Loop] to damage (Picked unit), dealing TeNe_Real[1] damage of attack type Hero and damage type Normal
- -------- ============================= --------
- Custom script: call RemoveLocation(udg_TeNe_Point[6])
- Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Destructible - Pick every destructible within 50.00 of TeNe_Point[4] and do (Actions)
-
Loop - Actions
- Set TeNe_Distance[TeNe_Loop] = 0.00
-
Loop - Actions
- -------- ============================= --------
-
If - Conditions
- Custom script: call RemoveLocation(udg_TeNe_Point[4])
- Custom script: call RemoveLocation(udg_TeNe_Point[5])
-
Loop - Actions
-
For each (Integer TeNe_Loop) from 1 to TeNe_Index, do (Actions)
-
Events
Lastly here's a video example
Video example:
Last edited: