- Joined
- Aug 23, 2008
- Messages
- 2,319
I've got a trigger for a turn-based battle system. Problem is: I need to check which unit is active. For this turn-based I use the Integer A loop, which makes it annoying to check who actually is the active unit. This is the trigger part that's necessary:
So let's say Unit1 (AllyATB_BattleUnit[1]) is the unit which has AllyATB_BattleUnit[Integer A] = 100. Then I need to check what unit(-type) Unit1 is. Any idea's? Maybe it's just me, because I'm still not very advanced with Integer A loops xD
-
ATB Gauge
-
Events
- Time - Every 0.25 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to (Number of units in AllyBattleGroup), do (Actions)
-
Loop - Actions
- Set AllyATB__BattleUnit[(Integer A)] = (AllyATB__BattleUnit[(Integer A)] + (AttSPEED__Character[(Integer A)] / 10))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AllyATB__BattleUnit[(Integer A)] Greater than or equal to 100
-
Then - Actions
- Trigger - Turn off (This trigger)
- -------- Battle Menu --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- <PROBLEM HERE>
-
Then - Actions
- Dialog - Show BattleMenu[1] for Player 1 (Red)
- Dialog - Change the title of BattleMenu[1] to
- Dialog - Create a dialog button for BattleMenu[1] labelled Attack
- Set BattleMenu__Attack = (Last created dialog Button)
- Dialog - Create a dialog button for BattleMenu[1] labelled Steal
- Set BattleMenu__Zidane_Steal = (Last created dialog Button)
- Dialog - Create a dialog button for BattleMenu[1] labelled Skill
- Set BattleMenu__Zidane_Skill = (Last created dialog Button)
- Dialog - Create a dialog button for BattleMenu[1] labelled Item
- Set BattleMenu__Item = (Last created dialog Button)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to BattleMenu__Attack
-
Then - Actions
- Set Active__Character[1] = 1
- Trigger - Turn on Next Target <gen>
- Trigger - Turn on Previous Target <gen>
- Trigger - Turn on Pick Target <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to BattleMenu__Zidane_Steal
-
Then - Actions
- Set Active__Character[1] = 1
- Trigger - Turn on Next Target <gen>
- Trigger - Turn on Previous Target <gen>
- Trigger - Turn on Pick Target <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to BattleMenu__Zidane_Skill
-
Then - Actions
- Set Active__Character[1] = 1
- Trigger - Turn on Next Target <gen>
- Trigger - Turn on Previous Target <gen>
- Trigger - Turn on Pick Target <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to BattleMenu__Item
-
Then - Actions
- Set Active__Character[1] = 1
- Trigger - Turn on Next Target <gen>
- Trigger - Turn on Previous Target <gen>
- Trigger - Turn on Pick Target <gen>
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Set AllyATB__BattleUnit[1] = 0
- Trigger - Turn on (This trigger)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer A) from 1 to (Number of units in AllyBattleGroup), do (Actions)
-
Events
So let's say Unit1 (AllyATB_BattleUnit[1]) is the unit which has AllyATB_BattleUnit[Integer A] = 100. Then I need to check what unit(-type) Unit1 is. Any idea's? Maybe it's just me, because I'm still not very advanced with Integer A loops xD