- Joined
- May 24, 2016
- Messages
- 22
Okay, so I'm making a trigger based ability whereby a unit can change stance. Essentially, the character can change to have any damage type (with more mana spent to get to chaos than other types).
In order to do that, I'm using the Chaos ability, whereby each switch triggers giving the unit a chaos ability linking to a unit that is the exact same except for a different damage type.
Sure, I know there are probably issues for permanent stat gains, etc., which I will introduce to the trigger (by saving stat gains, etc., hopefully). But that's a future issue. Right now I've got a different issue.
So, the ability works, but only on the first time through. Even then, sometimes it gets stuck and oscillates between being magic type damage and the others. Sometimes, the ability gets stuck, and when it gets stuck, it's permanently stuck on that attack type. When stuck, it's always magic type. So...not exactly sure why that is either.
Second, sometimes when it's stuck it will do one of two things: (1. it will either cause infinite doubling of the base attack damage (but not damage interval) when the ability used or (2. it will cause infinite doubling of the armor when the ability is used.
So the two problems: the loops gets stuck at UseCount=7 or greater and the unit gets stuck on magic type, it seems (not sure why). Second, the unit's damage and armor double infinitely despite nothing about armor or damage in the triggers.
Can anybody help me understand why? For ease, I've posted the triggers below.
In order to do that, I'm using the Chaos ability, whereby each switch triggers giving the unit a chaos ability linking to a unit that is the exact same except for a different damage type.
Sure, I know there are probably issues for permanent stat gains, etc., which I will introduce to the trigger (by saving stat gains, etc., hopefully). But that's a future issue. Right now I've got a different issue.
So, the ability works, but only on the first time through. Even then, sometimes it gets stuck and oscillates between being magic type damage and the others. Sometimes, the ability gets stuck, and when it gets stuck, it's permanently stuck on that attack type. When stuck, it's always magic type. So...not exactly sure why that is either.
Second, sometimes when it's stuck it will do one of two things: (1. it will either cause infinite doubling of the base attack damage (but not damage interval) when the ability used or (2. it will cause infinite doubling of the armor when the ability is used.
So the two problems: the loops gets stuck at UseCount=7 or greater and the unit gets stuck on magic type, it seems (not sure why). Second, the unit's damage and armor double infinitely despite nothing about armor or damage in the triggers.
Can anybody help me understand why? For ease, I've posted the triggers below.
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set VariableSet ChangingTactCooldown[1] = 60.00
-
Set VariableSet ChangingTactCooldown[2] = 50.00
-
Set VariableSet ChangingTactCooldown[3] = 40.00
-
Set VariableSet ChangingTactCooldown[4] = 30.00
-
Set VariableSet ChangingTactCooldown[5] = 20.00
-
Set VariableSet ChangingTactCooldown[6] = 10.00
-
Set VariableSet ChangingTactCDWaitBefore[1] = 6.00
-
Set VariableSet ChangingTactCDWaitBefore[2] = 6.00
-
Set VariableSet ChangingTactCDWaitBefore[3] = 6.00
-
Set VariableSet ChangingTactCDWaitBefore[4] = 6.00
-
Set VariableSet ChangingTactCDWaitBefore[5] = 6.00
-
Set VariableSet ChangingTactCDWaitBefore[6] = 6.00
-
Set VariableSet ChangingTactStanceOrder[1] = Grace Mercy Stance (Magic)
-
Set VariableSet ChangingTactStanceOrder[2] = Grace Mercy Stance (Normal)
-
Set VariableSet ChangingTactStanceOrder[3] = Grace Mercy Stance (Piercing)
-
Set VariableSet ChangingTactStanceOrder[4] = Grace Mercy Stance (Siege)
-
Set VariableSet ChangingTactStanceOrder[5] = Grace Mercy Stance (Spells)
-
Set VariableSet ChangingTactStanceOrder[6] = Grace Mercy Stance (Chaos)
-
Set VariableSet ChangingTactStanceOrder[7] = Grace Mercy Stance (Hero)
-
Set VariableSet ChangingTactStanceOrder[0] = Grace Mercy Stance (Hero)
-
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Changing Tact
-
-
Actions
-
Set VariableSet ChangingTactIndex = (ChangingTactIndex + 1)
-
Set VariableSet ChangingTactUser[ChangingTactIndex] = (Triggering unit)
-
Set VariableSet ChangingTactUserLevel[ChangingTactIndex] = (Level of Changing Tact for ChangingTactUser[ChangingTactIndex])
-
For each (Integer ChangingTactPreviousUseLoop) from 1 to (ChangingTactIndex - 1), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChangingTactUser[ChangingTactPreviousUseLoop] Equal to ChangingTactUser[ChangingTactIndex]
-
ChangingTactIndex Greater than 1
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChangingTactUseCount[ChangingTactPreviousUseLoop] Less than 6
-
-
Then - Actions
-
Set VariableSet ChangingTactUseCount[ChangingTactPreviousUseLoop] = (ChangingTactUseCount[ChangingTactPreviousUseLoop] + 1)
-
Unit - Remove ChangingTactStanceOrder[(ChangingTactUseCount[ChangingTactPreviousUseLoop] - 1)] from ChangingTactUser[ChangingTactPreviousUseLoop]
-
Unit - Add ChangingTactStanceOrder[ChangingTactUseCount[ChangingTactPreviousUseLoop]] to ChangingTactUser[ChangingTactPreviousUseLoop]
-
Game - Display to (All players) the text: (String(ChangingTactUseCount[ChangingTactPreviousUseLoop]))
-
-
Else - Actions
-
Set VariableSet ChangingTactUseCount[ChangingTactPreviousUseLoop] = (ChangingTactUseCount[ChangingTactPreviousUseLoop] + 1)
-
Unit - Remove ChangingTactStanceOrder[(ChangingTactUseCount[ChangingTactPreviousUseLoop] - 1)] from ChangingTactUser[ChangingTactPreviousUseLoop]
-
Unit - Add ChangingTactStanceOrder[ChangingTactUseCount[ChangingTactPreviousUseLoop]] to ChangingTactUser[ChangingTactPreviousUseLoop]
-
Unit - For Unit ChangingTactUser[ChangingTactPreviousUseLoop], start cooldown of ability Changing Tact " over "ChangingTactCooldown[ChangingTactUserLevel[ChangingTactPreviousUseLoop]] seconds.
-
Game - Display to (All players) the text: We hit 7 times
-
-
-
Set VariableSet ChangingTactUser[ChangingTactIndex] = No unit
-
Set VariableSet ChangingTactIndex = (ChangingTactIndex - 1)
-
-
Else - Actions
-
Set VariableSet ChangingTactUseCount[ChangingTactIndex] = 1
-
Unit - Remove ChangingTactStanceOrder[0] from ChangingTactUser[ChangingTactIndex]
-
Unit - Add ChangingTactStanceOrder[1] to ChangingTactUser[ChangingTactIndex]
-
Set VariableSet ChangingTactTimer[ChangingTactIndex] = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChangingTactIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on ChangingTactLoop <gen>
-
-
Else - Actions
-
-
-
-
-
-
-
ChangingTactLoop
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer ChangingTactTimerLoop) from 1 to ChangingTactIndex, do (Actions)
-
Loop - Actions
-
Set VariableSet ChangingTactTimer[ChangingTactTimerLoop] = (ChangingTactTimer[ChangingTactTimerLoop] + 0.05)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChangingTactTimer[ChangingTactTimerLoop] Greater than or equal to ChangingTactCooldown[ChangingTactUserLevel[ChangingTactTimerLoop]]
-
-
Then - Actions
-
Unit - Remove ChangingTactStanceOrder[ChangingTactUseCount[ChangingTactTimerLoop]] from ChangingTactUser[ChangingTactTimerLoop]
-
Unit - Add ChangingTactStanceOrder[0] to ChangingTactUser[ChangingTactTimerLoop]
-
Unit - For Unit ChangingTactUser[ChangingTactTimerLoop], end cooldown of ability Changing Tact
-
Set VariableSet ChangingTactUser[ChangingTactTimerLoop] = ChangingTactUser[ChangingTactIndex]
-
Set VariableSet ChangingTactUserLevel[ChangingTactTimerLoop] = ChangingTactUserLevel[ChangingTactIndex]
-
Set VariableSet ChangingTactUseCount[ChangingTactTimerLoop] = ChangingTactUseCount[ChangingTactIndex]
-
Set VariableSet ChangingTactTimer[ChangingTactTimerLoop] = ChangingTactTimer[ChangingTactIndex]
-
Set VariableSet ChangingTactUser[ChangingTactIndex] = No unit
-
Set VariableSet ChangingTactUseCount[ChangingTactIndex] = 0
-
Set VariableSet ChangingTactIndex = (ChangingTactIndex - 1)
-
Set VariableSet ChangingTactTimerLoop = (ChangingTactTimerLoop - 1)
-
-
Else - Actions
-
-------- I've turned this off until I've located the issue, as it really just makes it longer to test. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChangingTactTimer[ChangingTactTimerLoop] Greater than or equal to ChangingTactCDWaitBefore[ChangingTactUserLevel[ChangingTactTimerLoop]]
-
-
Then - Actions
-
Unit - For Unit ChangingTactUser[ChangingTactTimerLoop], start cooldown of ability Changing Tact " over "(ChangingTactCooldown[ChangingTactUserLevel[ChangingTactTimerLoop]] - ChangingTactCDWaitBefore[ChangingTactUserLevel[ChangingTactTimerLoop]]) seconds.
-
-
Else - Actions
-
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChangingTactIndex Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-