- Joined
- May 20, 2009
- Messages
- 822
So, basically. What this spell is suppose to do:
EDIT: The timer does not appear to work. When it reaches ~30 on the timer, it doesn't do what it's suppose to do.
Which is remove the attack speed bonus, deindex the unit, and if the unit hasn't done any knockback yet it doesn't allow that to happen until the ability is cast again.
But that doesn't happen. /EDIT
1. Hero activates it.
1a. Hero attacks #% faster for the next three attacks.
2. Next three attacks do #% extra damage.
3. The third attack also knocks back the target being attacked.
4. This ability has 30 seconds to perform the attacks, otherwise it's just wasted mana.
For this spell, I am using two systems.
GUI Friendly Damage Detection System
Paladon's Lightning Strike (Ripped the Knockback system out of it)
Here are my Triggers:
After this, I have no idea what to do...Maybe someone can help me learn how I can reduce the number of triggers here?
EDIT: The timer does not appear to work. When it reaches ~30 on the timer, it doesn't do what it's suppose to do.
Which is remove the attack speed bonus, deindex the unit, and if the unit hasn't done any knockback yet it doesn't allow that to happen until the ability is cast again.
But that doesn't happen. /EDIT
1. Hero activates it.
1a. Hero attacks #% faster for the next three attacks.
2. Next three attacks do #% extra damage.
3. The third attack also knocks back the target being attacked.
4. This ability has 30 seconds to perform the attacks, otherwise it's just wasted mana.
For this spell, I am using two systems.
GUI Friendly Damage Detection System
Paladon's Lightning Strike (Ripped the Knockback system out of it)
Here are my Triggers:
-
ThrashBash Start
-
Events
- Unit - A unit Starts the effect of an ability
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Thrash & Bash
- (Unit-type of (Triggering unit)) Equal to Grandmaster of Arms
-
Then - Actions
- Set TBMaxIndex = (TBMaxIndex + 1)
- Set TBCaster[TBMaxIndex] = (Triggering unit)
- Set TBHitCount[TBMaxIndex] = 0
- Set TBTimer[TBMaxIndex] = 0
- Set TBAbilityStarted[TBMaxIndex] = True
- Set TBCurrentCaster[TBMaxIndex] = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Thrash & Bash for (Triggering unit)) Equal to 1
-
Then - Actions
- Unit - Add T&B Attack Speed Bonus (Level 1) to (Triggering unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Thrash & Bash for (Triggering unit)) Equal to 2
-
Then - Actions
- Unit - Add T&B Attack Speed Bonus (Level 2) to (Triggering unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Thrash & Bash for (Triggering unit)) Equal to 3
-
Then - Actions
- Unit - Add T&B Attack Speed Bonus (Level 3) to (Triggering unit)
- 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)
-
If - Conditions
- Trigger - Turn on ThrashBash Calc <gen>
- Trigger - Turn on ThrashBash GetDamageAmount <gen>
- Trigger - Turn on ThrashBash Knockback <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
ThrashBash Knockback
-
Events
- Unit - A unit Is attacked
- Conditions
-
Actions
-
For each (Integer TBInit) from 1 to TBMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Attacking unit) Equal to TBCaster[TBInit]
- TBTimer[TBInit] Less than or equal to 165
-
Then - Actions
- Set TBCurrentCaster[TBInit] = (Attacking unit)
- Set TBHitCount[TBInit] = (TBHitCount[TBInit] + 1)
- Set TBTargetUnit[TBInit] = (Attacked unit)
- Set TBTargetPoint[TBInit] = (Position of (Attacking unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TBHitCount[TBInit] Equal to 3
-
Then - Actions
- Set TBAbilityStarted[TBInit] = False
- Unit - Remove T&B Attack Speed Bonus (Level 1) from TBCaster[TBInit]
- Unit - Remove T&B Attack Speed Bonus (Level 2) from TBCaster[TBInit]
- Unit - Remove T&B Attack Speed Bonus (Level 3) from TBCaster[TBInit]
- Set KBA_Caster = TBCaster[TBInit]
- Set KBA_TargetUnit = TBTargetUnit[TBInit]
- Set KBA_StartingPosition = TBTargetPoint[TBInit]
- Set KBA_Level = 0
- Set KBA_Speed = 20.00
- Set KBA_DistancePerLevel = 400.00
- Set KBA_SpecialEffects[1] = <Empty String>
- Set KBA_SpecialEffects[2] = <Empty String>
- Set KBA_DestroyTrees = False
- Trigger - Run Cast A Knockback <gen> (checking conditions)
- -------- DEINDEX --------
- Set TBUnitDeIndexer[TBInit] = TBCaster[TBInit]
- Trigger - Run ThrashBash Deindex <gen> (checking conditions)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer TBInit) from 1 to TBMaxIndex, do (Actions)
-
Events
-
ThrashBash GetDamageAmount
-
Events
- Game - GDD_Event becomes Equal to 0.00
- Conditions
-
Actions
-
For each (Integer TBDamageInit) from 1 to TBMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GDD_DamageSource Equal to TBCaster[TBDamageInit]
- TBAbilityStarted[TBDamageInit] Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Thrash & Bash for TBCaster[TBInit]) Equal to 1
-
Then - Actions
- Set TBDamageAmount[TBDamageInit] = (GDD_Damage x 0.25)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Thrash & Bash for TBCaster[TBInit]) Equal to 2
-
Then - Actions
- Set TBDamageAmount[TBDamageInit] = (GDD_Damage x 0.50)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Thrash & Bash for TBCaster[TBInit]) Equal to 3
-
Then - Actions
- Set TBDamageAmount[TBDamageInit] = (GDD_Damage x 0.75)
- 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)
-
If - Conditions
- Trigger - Turn off (This trigger)
- Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing TBDamageAmount[TBDamageInit] damage of attack type Normal and damage type Normal
- Trigger - Turn on (This trigger)
-
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)
-
Loop - Actions
-
For each (Integer TBDamageInit) from 1 to TBMaxIndex, do (Actions)
-
Events
-
ThrashBash Calc
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer TBTimerInit) from 1 to TBMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TBCaster[TBTimerInit] Equal to TBCurrentCaster[TBTimerInit]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TBTimer[TBTimerInit] Less than or equal to 164
-
Then - Actions
- Set TBTimer[TBTimerInit] = (TBTimer[TBTimerInit] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TBTimer[TBTimerInit] Greater than or equal to 165
-
Then - Actions
- -------- DEINDEX --------
- Unit - Remove T&B Attack Speed Bonus (Level 1) from TBCaster[TBInit]
- Unit - Remove T&B Attack Speed Bonus (Level 2) from TBCaster[TBInit]
- Unit - Remove T&B Attack Speed Bonus (Level 3) from TBCaster[TBInit]
- Set TBAbilityStarted[TBTimerInit] = False
- Set TBUnitDeIndexer[TBTimerInit] = TBCaster[TBTimerInit]
- Trigger - Run ThrashBash Deindex <gen> (checking conditions)
- Else - Actions
-
If - Conditions
-
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)
-
Loop - Actions
-
For each (Integer TBTimerInit) from 1 to TBMaxIndex, do (Actions)
-
Events
-
ThrashBash Deindex
- Events
- Conditions
-
Actions
-
For each (Integer TBDeindexInit) from 1 to TBMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TBCaster[TBDeindexInit] Equal to TBUnitDeIndexer[TBDeindexInit]
-
Then - Actions
- Set TBCaster[TBDeindexInit] = TBCaster[TBMaxIndex]
- Set TBCaster[TBMaxIndex] = No unit
- Set TBHitCount[TBDeindexInit] = TBHitCount[TBMaxIndex]
- Set TBHitCount[TBMaxIndex] = 0
- Set TBTimer[TBDeindexInit] = TBTimer[TBMaxIndex]
- Set TBTimer[TBMaxIndex] = 0
- Set TBAbilityStarted[TBDeindexInit] = TBAbilityStarted[TBMaxIndex]
- Set TBAbilityStarted[TBMaxIndex] = False
- Set TBTargetUnit[TBDeindexInit] = TBTargetUnit[TBMaxIndex]
- Set TBTargetUnit[TBMaxIndex] = No unit
- Set TBTargetPoint[TBDeindexInit] = TBTargetPoint[TBMaxIndex]
- Custom script: set udg_TBTargetPoint[udg_TBMaxIndex] = null
- Set TBMaxIndex = (TBMaxIndex - 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer TBDeindexInit) from 1 to TBMaxIndex, do (Actions)
After this, I have no idea what to do...Maybe someone can help me learn how I can reduce the number of triggers here?
Last edited: