I am currently working on a Turn Based Battle System based on Breath of Fire 2 (Old Nintendo and GameBoy Advanced Game).
Reference: http://www.youtube.com/watch?v=IuxEjweCfnI (Only need to watch 20 seconds of fight to understand mechanics)
The Battle system is having trouble. Sometimes the Fight freezes and the unit who attacks last seems to attack a "null" unit. I don't understand why.
I think the problematic triggers are "Battle Orders" and "Battle Fight"
Systems Used:
Bribe's Damage Engine: http://www.hiveworkshop.com/forums/...=bribes%20damage%20engine&d=list&r=20&u=bribe
High to Low Sorter: http://www.hiveworkshop.com/forums/...-2-5-a-240626/?prev=search=sorter&d=list&r=20
The coding at this stage is leaky and inefficient. I'm just trying to get the system operational at this stage.
To Test Battle System In Game:
1.) Type -world to begin wandering.
2.) Walk to encounter an enemy
3.) Type -heal party to heal your units to prevent them dying.
Open the "Breath of Fire 2" map within the campaign editor. You can only properly test campaigns from inside Warcraft 3 (you cannot use the test map button. Copy the campaign into your Warcraft 3 folder and open it from inside Warcraft 3).
Reference: http://www.youtube.com/watch?v=IuxEjweCfnI (Only need to watch 20 seconds of fight to understand mechanics)
The Battle system is having trouble. Sometimes the Fight freezes and the unit who attacks last seems to attack a "null" unit. I don't understand why.
I think the problematic triggers are "Battle Orders" and "Battle Fight"
-
Battle Enemy Setup
-
Events
- Map initialization
- Conditions
-
Actions
- Hashtable - Create a hashtable
- Set EnemyGroups = (Last created hashtable)
- Set MonsterFormation = 0
- -------- -------------------------- --------
- Set MonsterFormation = (MonsterFormation + 1)
- Set MonsterCounter = 1
- Set MonsterUnitType = Gonghead
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- Set MonsterCounter = (MonsterCounter + 1)
- Set MonsterUnitType = Gonghead
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- -------- -------------------------- --------
- Set MonsterFormation = (MonsterFormation + 1)
- Set MonsterCounter = 1
- Set MonsterUnitType = Gonghead
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- Set MonsterCounter = (MonsterCounter + 1)
- Set MonsterUnitType = A. Sludge
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- Set MonsterCounter = (MonsterCounter + 1)
- Set MonsterUnitType = A. Sludge
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- -------- -------------------------- --------
- Set MonsterFormation = (MonsterFormation + 1)
- Set MonsterCounter = 1
- Set MonsterUnitType = Gonghead
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- -------- -------------------------- --------
- Set MonsterFormation = (MonsterFormation + 1)
- Set MonsterCounter = 1
- Set MonsterUnitType = A. Sludge
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- Set MonsterCounter = (MonsterCounter + 1)
- Set MonsterUnitType = A. Sludge
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- -------- -------------------------- --------
- Set MonsterFormation = (MonsterFormation + 1)
- Set MonsterCounter = 1
- Set MonsterUnitType = A. Sludge
- Custom script: set udg_MonsterInteger = udg_MonsterUnitType
- Hashtable - Save MonsterInteger as MonsterCounter of MonsterFormation in EnemyGroups
- -------- -------------------------- --------
- -------- -------------------------- --------
- -------- -------------------------- --------
- Set MonsterNumberFormations = MonsterFormation
-
Events
-
Battle Preload Region
-
Events
- Unit - A unit enters World 1 Area <gen>
- Unit - A unit enters World 2 Area <gen>
-
Conditions
- (Triggering unit) Equal to Party_Order[1]
-
Actions
- -------- ------------------ --------
- -------- Camera Unit --------
- -------- ------------------ --------
- Unit - Remove Fight_Camera_Unit from the game
- Unit - Create 1 Battle Camera Lock for Player 9 (Gray) at (Target of BattleScene1 <gen>) facing Default building facing degrees
- Set Fight_Camera_Unit = (Last created unit)
- Unit - Pause Fight_Camera_Unit
- -------- ------------------ --------
- -------- Unit Positions --------
- -------- ------------------ --------
- Custom script: call RemoveLocation (udg_Fight_Alliance_Points[1])
- Custom script: call RemoveLocation (udg_Fight_Alliance_Points[2])
- Custom script: call RemoveLocation (udg_Fight_Alliance_Points[3])
- Custom script: call RemoveLocation (udg_Fight_Alliance_Points[4])
- Custom script: call RemoveLocation (udg_Fight_Enemy_Points[1])
- Custom script: call RemoveLocation (udg_Fight_Enemy_Points[2])
- Custom script: call RemoveLocation (udg_Fight_Enemy_Points[3])
- Custom script: call RemoveLocation (udg_Fight_Enemy_Points[4])
- Custom script: call RemoveLocation (udg_Fight_Enemy_Points[5])
- -------- World Area 1 and 2 both use the same Battlefield. --------
- -------- A battlefield is simply for display, not for allocating enemies. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (World 1 Area <gen> contains (Triggering unit)) Equal to True
- (World 2 Area <gen> contains (Triggering unit)) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set Fight_Alliance_Points[1] = ((Center of Battle 1 Alliance <gen>) offset by (-100.00, 100.00))
- Set Fight_Alliance_Points[2] = ((Center of Battle 1 Alliance <gen>) offset by (-100.00, -100.00))
- Set Fight_Alliance_Points[3] = ((Center of Battle 1 Alliance <gen>) offset by (100.00, 100.00))
- Set Fight_Alliance_Points[4] = ((Center of Battle 1 Alliance <gen>) offset by (100.00, -100.00))
- Set Fight_Enemy_Points[1] = ((Center of Battle 1 Enemies <gen>) offset by (0.00, -150.00))
- Set Fight_Enemy_Points[2] = ((Center of Battle 1 Enemies <gen>) offset by (150.00, 0.00))
- Set Fight_Enemy_Points[3] = (Center of Battle 1 Enemies <gen>)
- Set Fight_Enemy_Points[4] = ((Center of Battle 1 Enemies <gen>) offset by (0.00, 150.00))
- Set Fight_Enemy_Points[5] = ((Center of Battle 1 Enemies <gen>) offset by (150.00, 0.00))
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
Events
-
Count Distance
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
- Set WalkPoint1 = WalkPoint2
- Set WalkPoint2 = (Position of Party_Order[1])
- Set WalkAmount = (WalkAmount + (Distance between WalkPoint1 and WalkPoint2))
- Custom script: call RemoveLocation (udg_WalkPoint1)
- Custom script: set udg_WalkPoint1=null
-
Events
-
Battle Encounter
-
Events
- Game - WalkAmount becomes Greater than or equal to 900.00
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WalkAmount Greater than or equal to WalkAmountRandomReal
-
Then - Actions
- Game - Display to (All players) for 3.00 seconds the text: (String(WalkAmount))
- Set WalkAmount = 0.00
- Set WalkAmountRandomReal = (Random real number between 900.00 and 2000.00)
- Set Fight_Return_Point = (Position of Party_Order[1])
-
Unit Group - Pick every unit in Party_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Stop
- Unit - Set (Picked unit) movement speed to 0.00
-
Loop - Actions
- Cinematic - Fade out and back in over 2.10 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Sound - Play Enemy_Encountered <gen>
- Trigger - Run Battle Setup <gen> (checking conditions)
- Trigger - Turn off Count Distance <gen>
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Battle Create Enemy
- Events
- Conditions
-
Actions
- Camera - Apply BattleScene1 <gen> for Player 1 (Red) over 0.00 seconds
- Camera - Lock camera target for Player 1 (Red) to Fight_Camera_Unit, offset by (0.00, 0.00) using Default rotation
- Set MonsterFormation = (Random integer number between 1 and MonsterNumberFormations)
-
For each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
- Set MonsterInteger = (Load (Integer A) of MonsterFormation from EnemyGroups)
- Custom script: set udg_MonsterUnitType = udg_MonsterInteger
- Unit - Create 1 MonsterUnitType for Player 12 (Brown) at Fight_Enemy_Points[(Integer A)] facing Default building facing degrees
- Unit - Set the custom value of (Last created unit) to (Random integer number between 40 and 80)
- Unit - Set (Last created unit) movement speed to 0.00
- Unit Group - Add (Last created unit) to Fight_Enemy_Group
-
Loop - Actions
- Unit Group - Add all units of Party_Group to Fight_Ally_Group
- Unit Group - Add all units of Fight_Ally_Group to Figh_All_Units_Group
- Unit Group - Add all units of Fight_Enemy_Group to Figh_All_Units_Group
- Game - Display to (All players) for 10.00 seconds the text: (AllyGroup: + (String((Number of units in Fight_Ally_Group))))
- Game - Display to (All players) for 10.00 seconds the text: (EnemyGroup: + (String((Number of units in Fight_Enemy_Group))))
- Game - Display to (All players) for 10.00 seconds the text: (AllUnits: + (String((Number of units in Figh_All_Units_Group))))
- Trigger - Run Battle Register Speed <gen> (checking conditions)
-
Battle Register Speed
- Events
- Conditions
-
Actions
- Set h2LCounter = 1
-
Unit Group - Pick every unit in Fight_Ally_Group and do (Actions)
-
Loop - Actions
- Set h2LSorterUnitArray[h2LCounter] = (Picked unit)
- Set h2LCounter = (h2LCounter + 1)
-
Loop - Actions
-
Unit Group - Pick every unit in Fight_Enemy_Group and do (Actions)
-
Loop - Actions
- Set h2LSorterUnitArray[h2LCounter] = (Picked unit)
- Set h2LCounter = (h2LCounter + 1)
-
Loop - Actions
- -------- The minimum value is the lowest key value that you use in the array. Example: I used tempInt from 1 to 10. The minimum value is 1. --------
- Set h2LMinValue = 1
- -------- The maximum value is the highest key value that you use in the array. Example: I used tempInt from 1 to 10. The maximum value is 1. --------
- Set h2LMaxValue = (Number of units in Figh_All_Units_Group)
- -------- Then you call the sorter function --------
- Custom script: call H2LCustomValueSorter()
-
For each (Integer A) from 1 to h2LMaxValue, do (Actions)
-
Loop - Actions
- -------- You can display which unit is in first second and so on using this. --------
- Game - Display to (All players) the text: ((Name of h2LSorterUnitArray[(Integer A)]) + (String(h2LReturnedPlacementH2L[(Custom value of h2LSorterUnitArray[(Integer A)])])))
-
Loop - Actions
-
Battle Setup
- Events
- Conditions
-
Actions
- Wait 1.00 seconds
- Unit - Change ownership of Party_Order[1] to Player 9 (Gray) and Change color
- Selection - Clear selection for Player 1 (Red)
- Trigger - Run Battle Create Enemy <gen> (ignoring conditions)
- Unit - Move Party_Order[1] instantly to Fight_Alliance_Points[1], facing Fight_Enemy_Points[3]
- Unit - Move Party_Order[2] instantly to Fight_Alliance_Points[2], facing Fight_Enemy_Points[3]
- Unit - Move Party_Order[3] instantly to Fight_Alliance_Points[3], facing Fight_Enemy_Points[3]
- Unit - Move Party_Order[4] instantly to Fight_Alliance_Points[4], facing Fight_Enemy_Points[3]
- Sound - Stop CurrentlyPlayingMusic[1] Immediately
- Sound - Stop CurrentlyPlayingMusic[2] Immediately
- Sound - Set volume of CurrentlyPlayingMusic[2] to 100.00%
- Sound - Play CurrentlyPlayingMusic[2]
- Wait 1.00 seconds
- Set FightCounter = 0
- Trigger - Turn on Battle Orders <gen>
- Trigger - Run Battle Orders <gen> (ignoring conditions)
-
Battle Orders
-
Events
- Unit - A unit Is issued an order targeting an object
-
Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Actions
- Unit - Order (Triggering unit) to Stop
- Unit - Change ownership of (Triggering unit) to Player 9 (Gray) and Change color
- Set FightCounter = (FightCounter + 1)
- Game - Display to (All players) for 5.00 seconds the text: (FightCounter: + (String(FightCounter)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- FightCounter Greater than or equal to ((Number of units in Figh_All_Units_Group) + 0)
-
Then - Actions
- Set FightCounter = 1
- Game - Display to (All players) for 5.00 seconds the text: -------------------...
- Wait 1.00 seconds
- Trigger - Run Battle Fight <gen> (checking conditions)
- Trigger - Turn off (This trigger)
- Skip remaining actions
- Else - Actions
-
If - Conditions
- Set Fight_Unit_Pending = h2LSorterUnitArray[h2LReturnedPlacementH2L[(Custom value of h2LSorterUnitArray[FightCounter])]]
- Set Fight_Next_Unit = h2LSorterUnitArray[h2LReturnedPlacementH2L[(Custom value of h2LSorterUnitArray[(FightCounter + 1)])]]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Fight_Unit_Pending is in Fight_Enemy_Group) Equal to True
-
Then - Actions
- Set Fight_Targeted_Enemy[FightCounter] = (Random unit from Fight_Ally_Group)
- Set Fight_Basic_Attack[FightCounter] = True
- Game - Display to (All players) for 5.00 seconds the text: (PlacementNumber: + (String(FightCounter)))
- Game - Display to (All players) for 5.00 seconds the text: (SavedFightTargetUnit: + (Name of Fight_Targeted_Enemy[FightCounter]))
- Game - Display to (All players) for 5.00 seconds the text: (NextUnit: + (Name of Fight_Next_Unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Fight_Next_Unit is in Fight_Ally_Group) Equal to True
-
Then - Actions
- Unit - Change ownership of Fight_Next_Unit to Player 1 (Red) and Change color
- Selection - Select Fight_Next_Unit for Player 1 (Red)
- Skip remaining actions
-
Else - Actions
- Trigger - Run (This trigger) (ignoring conditions)
- Skip remaining actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering unit) is in Fight_Ally_Group) Equal to True
-
Then - Actions
- Set Fight_Targeted_Enemy[FightCounter] = (Target unit of issued order)
- Game - Display to (All players) for 5.00 seconds the text: (PlacementNumber: + (String(FightCounter)))
- Game - Display to (All players) for 5.00 seconds the text: (SavedFightTargetUnit: + (Name of Fight_Targeted_Enemy[FightCounter]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Issued order) Equal to (Order(attack))
-
Then - Actions
- Set Fight_Basic_Attack[FightCounter] = True
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- FightCounter Greater than or equal to ((Number of units in Figh_All_Units_Group) + 0)
-
Then - Actions
- Set FightCounter = 1
- Game - Display to (All players) for 5.00 seconds the text: -------------------...
- Wait 1.00 seconds
- Trigger - Run Battle Fight <gen> (checking conditions)
- Trigger - Turn off (This trigger)
- Skip remaining actions
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Fight_Next_Unit is in Fight_Ally_Group) Equal to True
-
Then - Actions
- Game - Display to (All players) for 5.00 seconds the text: (PlacementNumber: + (String(FightCounter)))
- Game - Display to (All players) for 5.00 seconds the text: (NextUnit: + (Name of Fight_Next_Unit))
- Unit - Change ownership of Fight_Next_Unit to Player 1 (Red) and Change color
- Selection - Select Fight_Next_Unit for Player 1 (Red)
- Else - Actions
-
If - Conditions
-
Events
-
Battle Fight
- Events
-
Conditions
- (Number of units in Fight_Enemy_Group) Greater than 0
- (Number of units in Fight_Ally_Group) Greater than 0
-
Actions
- Game - Display to (All players) for 5.00 seconds the text: (FightCounter: + (String(FightCounter)))
- Game - Display to (All players) for 5.00 seconds the text: (h2LUnit: + (Name of h2LSorterUnitArray[h2LReturnedPlacementH2L[(Custom value of h2LSorterUnitArray[FightCounter])]]))
- Game - Display to (All players) for 5.00 seconds the text: (FightTargetedEnemy: + (Name of Fight_Targeted_Enemy[FightCounter]))
- -------- Checks unit next in line to attack (Speed Base System) --------
- Animation - Play h2LSorterUnitArray[h2LReturnedPlacementH2L[(Custom value of h2LSorterUnitArray[FightCounter])]]'s attack animation
- Animation - Queue h2LSorterUnitArray[h2LReturnedPlacementH2L[(Custom value of h2LSorterUnitArray[FightCounter])]]'s stand animation
- Sound - Play SwingAttack <gen>
- Wait 0.55 seconds
- Unit - Cause h2LSorterUnitArray[h2LReturnedPlacementH2L[(Custom value of h2LSorterUnitArray[FightCounter])]] to damage Fight_Targeted_Enemy[FightCounter], dealing 10.00 damage of attack type Normal and damage type Normal
- Set FightCounter = (FightCounter + 1)
- Wait 2.00 seconds
- -------- Next Line will check if all units in battle (including enemy Demons) have had thier turn --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Fight_Enemy_Group) Equal to 0
-
Then - Actions
- Trigger - Run Battle Victory <gen> (checking conditions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Fight_Ally_Group) Equal to 0
-
Then - Actions
- Trigger - Run Battle Defeat <gen> (checking conditions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- FightCounter Greater than or equal to ((Number of units in Figh_All_Units_Group) + 1)
-
Then - Actions
- -------- All Units have had their turn. Another round will begin. --------
- Set FightCounter = 0
- Trigger - Turn on Battle Orders <gen>
- Trigger - Run Battle Orders <gen> (ignoring conditions)
-
Else - Actions
- -------- All units haven't had their turn yet. Another unit remains to have their turn. --------
- Trigger - Run Battle Fight <gen> (checking conditions)
-
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
-
Battle Unit Dies
-
Events
- Game - DamageModifierEvent becomes Equal to 1.00
-
Conditions
- DamageEventAmount Greater than or equal to (Life of DamageEventTarget)
-
Actions
- Set Point = (Position of DamageEventTarget)
- Floating Text - Create floating text that reads (String(DamageEventAmount)) at Point with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Custom script: call RemoveLocation(udg_Point)
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 4.50 seconds
- Floating Text - Change the fading age of (Last created floating text) to 2.50 seconds
- Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
- Unit Group - Remove DamageEventTarget from Figh_All_Units_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (DamageEventTarget is in Fight_Ally_Group) Equal to True
-
Then - Actions
- Unit Group - Remove DamageEventTarget from Fight_Ally_Group
- Trigger - Run Battle Register Speed <gen> (checking conditions)
- Sound - Play Flinch1 <gen>
- Animation - Play DamageEventTarget's death animation
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (DamageEventTarget is in Fight_Enemy_Group) Equal to True
-
Then - Actions
- Unit Group - Remove DamageEventTarget from Fight_Enemy_Group
- Trigger - Run Battle Register Speed <gen> (checking conditions)
- Sound - Play Flinch1 <gen>
- Sound - Play Unit_Die <gen>
- Animation - Change DamageEventTarget's animation speed to 0.00% of its original speed
- Animation - Change DamageEventTarget's vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Wait 0.75 seconds
- Unit - Remove DamageEventTarget from the game
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
-
Battle Unit Damaged
-
Events
- Game - DamageEvent becomes Equal to 1.00
-
Conditions
- DamageEventAmount Less than (Life of DamageEventTarget)
-
Actions
- Set Point = (Position of DamageEventTarget)
- Floating Text - Create floating text that reads (String(DamageEventAmount)) at Point with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Custom script: call RemoveLocation(udg_Point)
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 4.50 seconds
- Floating Text - Change the fading age of (Last created floating text) to 2.50 seconds
- Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
- Sound - Play Flinch1 <gen>
- Animation - Play DamageEventTarget's death animation
- Wait 0.18 seconds
- Animation - Play DamageEventTarget's stand animation
-
Events
-
Battle Victory
- Events
- Conditions
-
Actions
- Set FightCounter = 1
- Game - Display to (All players) for 30.00 seconds the text: Victory! (Type "...
- Set CurrentlyPlayingMusic[3] = 26_Treasure <gen>
- Sound - Stop CurrentlyPlayingMusic[1] Immediately
- Sound - Stop CurrentlyPlayingMusic[2] Immediately
- Sound - Set volume of CurrentlyPlayingMusic[3] to 100.00%
- Sound - Play CurrentlyPlayingMusic[3]
- Trigger - Turn on Battle Resolve <gen>
-
Battle Defeat
- Events
- Conditions
-
Actions
- Set FightCounter = 1
- Game - Display to (All players) for 30.00 seconds the text: The Party has Falle...
- Set CurrentlyPlayingMusic[3] = 28_Give_me_a_Chance <gen>
- Sound - Stop CurrentlyPlayingMusic[1] Immediately
- Sound - Stop CurrentlyPlayingMusic[2] Immediately
- Sound - Set volume of CurrentlyPlayingMusic[3] to 100.00%
- Sound - Play CurrentlyPlayingMusic[3]
- Trigger - Turn on Battle Resolve <gen>
-
Battle Resolve
-
Events
- Player - Player 1 (Red) types a chat message containing -end as An exact match
- Conditions
-
Actions
- Sound - Play Select <gen>
- Unit Group - Remove all units from Fight_Ally_Group
- Unit Group - Remove all units from Fight_Enemy_Group
- Unit Group - Remove all units from Figh_All_Units_Group
- Cinematic - Fade out over 0.75 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Wait 0.75 seconds
-
Unit Group - Pick every unit in Party_Group and do (Actions)
-
Loop - Actions
- Unit - Move (Picked unit) instantly to Fight_Return_Point
- Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
-
Loop - Actions
- Set WalkPoint2 = (Position of Party_Order[1])
- Set WalkPoint1 = WalkPoint2
- Camera - Reset camera for Player 1 (Red) to standard game-view over 0.00 seconds
- Camera - Pan camera for Player 1 (Red) to Fight_Return_Point over 0.00 seconds
- Unit - Change ownership of Party_Order[1] to Player 1 (Red) and Change color
- Custom script: call RemoveLocation (udg_Fight_Return_Point)
- Trigger - Run Sound Fade out <gen> (checking conditions)
- Trigger - Run Follow The Leader <gen> (checking conditions)
- Cinematic - Fade in over 0.75 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Wait 0.75 seconds
- Trigger - Turn on Count Distance <gen>
- Trigger - Turn on Battle Encounter <gen>
- Sound - Stop CurrentlyPlayingMusic[1] Immediately
- Sound - Stop CurrentlyPlayingMusic[2] Immediately
- Sound - Stop CurrentlyPlayingMusic[3] Immediately
- Sound - Set volume of CurrentlyPlayingMusic[1] to 100.00%
- Sound - Play CurrentlyPlayingMusic[1]
- Trigger - Turn off (This trigger)
-
Events
Bribe's Damage Engine: http://www.hiveworkshop.com/forums/...=bribes%20damage%20engine&d=list&r=20&u=bribe
High to Low Sorter: http://www.hiveworkshop.com/forums/...-2-5-a-240626/?prev=search=sorter&d=list&r=20
The coding at this stage is leaky and inefficient. I'm just trying to get the system operational at this stage.
To Test Battle System In Game:
1.) Type -world to begin wandering.
2.) Walk to encounter an enemy
3.) Type -heal party to heal your units to prevent them dying.
Open the "Breath of Fire 2" map within the campaign editor. You can only properly test campaigns from inside Warcraft 3 (you cannot use the test map button. Copy the campaign into your Warcraft 3 folder and open it from inside Warcraft 3).
Attachments
Last edited: