I have a complicated map based on a missile system that lets you fly Star Wars ships about and duel.
About fifteen minutes into the map, things started to break in strange ways. I don't even begin to know where to look for the bug because it's unlike anything I've seen before. Here's one problem that just makes no sense to me:
I have a trigger called "test Copy" which gives me information to help debug. In short, it lists all the ships in the game and who their current AI target is (who are they going after). That's not important though because the bug is really strange. The trigger below fired; I know because the "environment" action was called and the screen did look differently after it. But nothing showed up on the screen, i.e. the "Game - Display to (All players) the text: (((Name of Fliers[test]) + (String(test))) + (Name of AiTargets[test]))" action didn't print anything. It should have printed a list about 75 names long. But nothing was printed. It's as if being player 1 wasn't included in "all players".
The same thing happened a moment later when the Star Destroyer was blown up and the ending trigger fired:
But there were no messages played to allies of player 11 (which would include me, as player 1). Cinematic mode was not turned on even though the trigger has "Cinematic - Turn cinematic mode On for (all players). Camera "Star Destroyer End" was not played for me even though it's in a loop for "all players."
I think the units were paused but I'm not sure because most of the movement is disabled when the game is working normally.
Finally, even though the trigger ends by picking all players and giving them either victory or defeat, nothing happened to me. I didn't get the victory screen or the defeat screen.
It looks as if somehow player 1 was no longer a player... That would account for some of the errors, though not all.
Does anyone know what could even cause a bug like this? I'm new to removing leaks and such, so maybe I destroyed a force when I shouldn't or something like that.
About fifteen minutes into the map, things started to break in strange ways. I don't even begin to know where to look for the bug because it's unlike anything I've seen before. Here's one problem that just makes no sense to me:
I have a trigger called "test Copy" which gives me information to help debug. In short, it lists all the ships in the game and who their current AI target is (who are they going after). That's not important though because the bug is really strange. The trigger below fired; I know because the "environment" action was called and the screen did look differently after it. But nothing showed up on the screen, i.e. the "Game - Display to (All players) the text: (((Name of Fliers[test]) + (String(test))) + (Name of AiTargets[test]))" action didn't print anything. It should have printed a list about 75 names long. But nothing was printed. It's as if being player 1 wasn't included in "all players".
-
test Copy
-
Events
-
Player - Player 1 (Red) types a chat message containing test as An exact match
-
Player - Player 2 (Blue) types a chat message containing test as An exact match
-
Player - Player 3 (Teal) types a chat message containing test as An exact match
-
-
Conditions
-
Actions
-
Hero - Set Hero[(Player number of (Triggering player))] Hero-level to 9, Show level-up graphics
-
For each (Integer test) from 1 to 75, do (Actions)
-
Loop - Actions
-
Game - Display to (All players) the text: (((Name of Fliers[test]) + (String(test))) + (Name of AiTargets[test]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Fliers[test] is in IonizedShips) Equal to True
-
-
Then - Actions
-
Game - Display to (All players) the text: (ion: + (Name of Fliers[test]))
-
-
Else - Actions
-
-
-
-
Unit Group - Pick every unit in FliersUG and do (Actions)
-
Loop - Actions
-
Game - Display to (All players) the text: (Name of (Picked unit))
-
-
-
Cinematic - Ping minimap for (All players) at ((Position of ATAT) offset by 1000.00 towards 135.00 degrees) for 5.00 seconds
-
Environment - Set fog to style Linear, z-start 1000000000.00, z-end 1000000000.00, density 0.00 and color (100.00%, 100.00%, 100.00%)
-
-
-
The same thing happened a moment later when the Star Destroyer was blown up and the ending trigger fired:
-
Rebels Wins
-
Events
-
Unit - Imperial Star Destroyer 0002 <gen> Dies
-
-
Conditions
-
Actions
-
Sound - Play Heroic Victory
-
Trigger - Run Ending Trigger cancel <gen> (ignoring conditions)
-
Cinematic - Turn cinematic mode On for (All players)
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Camera - Apply Star Destroyer End <gen> for (Picked player) over 0.00 seconds
-
Camera - Apply Star Destroyer End 3 <gen> for (Picked player) over 9.50 seconds
-
-
-
Animation - Change (Dying unit)'s animation speed to 5.00% of its original speed
-
Unit - Pause all units
-
Set BUSY = True
-
Unit Group - Pick every unit in (Units of type Laser Port empire) and do (Actions)
-
Loop - Actions
-
Unit - Unpause (Picked unit)
-
Unit - Kill (Picked unit)
-
-
-
Set tempPlayerGroup = (All allies of Player 11 (Dark Green))
-
Game - Display to tempPlayerGroup the text: |c0066ff66VICTORY|r...
-
Custom script: call DestroyForce(udg_tempPlayerGroup)
-
Set tempPlayerGroup = (All allies of Player 12 (Brown))
-
Game - Display to tempPlayerGroup the text: |c00FF0000FAILURE|r...
-
Custom script: call DestroyForce(udg_tempPlayerGroup)
-
Wait 2.00 game-time seconds
-
Animation - Change (Dying unit)'s animation speed to 30.00% of its original speed
-
Wait 5.00 game-time seconds
-
Animation - Change (Triggering unit) flying height to 800.00 at 50.00
-
Animation - Change (Dying unit)'s animation speed to 80.00% of its original speed
-
Wait 2.00 game-time seconds
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked player) is an ally of Player 11 (Dark Green)) Equal to True
-
-
Then - Actions
-
Game - Victory (Picked player) (Show dialogs, Show scores)
-
-
Else - Actions
-
Game - Defeat (Picked player) with the message: Defeat!
-
-
-
-
-
-
But there were no messages played to allies of player 11 (which would include me, as player 1). Cinematic mode was not turned on even though the trigger has "Cinematic - Turn cinematic mode On for (all players). Camera "Star Destroyer End" was not played for me even though it's in a loop for "all players."
I think the units were paused but I'm not sure because most of the movement is disabled when the game is working normally.
Finally, even though the trigger ends by picking all players and giving them either victory or defeat, nothing happened to me. I didn't get the victory screen or the defeat screen.
It looks as if somehow player 1 was no longer a player... That would account for some of the errors, though not all.
Does anyone know what could even cause a bug like this? I'm new to removing leaks and such, so maybe I destroyed a force when I shouldn't or something like that.