I've just tried waiting 2 seconds and it will load fine, but as soon as the 2 seconds expire (in-game), the game will crash.
Also, I've temporarily disabled the 3rd trigger for my tests but thanks for pointing it out :).
In trigger (2), the action "Variable - Set point_currentpillar = (Position of (Random Any unit from GROUP_MAZE_PILLAR_CELLS))"
(colored red) is causing the game to crash during loading. If I disable it, the map will load properly. If enabled, it will cause the game to crash when loading. Any help as to why this is happening and how to fix it will be greatly appreciated (and feel free to point out any other errors if you see them :P).
1)
GridGenerationEventsGame-MapinitializationLocalVariablesA=0.0<Real>B=0.0<Real>ConditionsActionsGeneral-ForeachrealAfrom1.0to50.0withincrement1.0,do(Actions)ActionsGeneral-ForeachrealBfrom1.0to50.0withincrement1.0,do(Actions)ActionsUnit-Create1SupplyDepotforplayer1at(MazeStartPointoffsetby((2.0*A),(2.0*B)))usingdefaultfacing(IgnorePlacement)UnitGroup-Add(Lastcreatedunit)toGROUP_MAZE_ALL_CELLSUnitGroup-Add(Lastcreatedunit)toGROUP_MAZE_DELETE_CELLSUnitGroup-Pickeachunitin(Anyunitsin(Region((MazeStartPointoffsetby(2.0,2.0)),1.0))ownedbyplayerAnyPlayermatchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)anddo(Actions)ActionsUnitGroup-Add(Pickedunit)toGROUP_MAZE_KEEP_CELLSUnitGroup-Remove(Pickedunit)fromGROUP_MAZE_DELETE_CELLSTrigger-RunMazeGeneration(CheckConditions,Don't Wait until it finishes)
2)
MazeGenerationEventsLocalVariablesA=0.0<Real>B=0.0<Real>point_currentpillar=NoPoint<Point>point_currentneighbor=NoPoint<Point>ConditionsActionsGeneral-ForeachrealAfrom1.0to4.0withincrement1.0,do(Actions)ActionsUnitGroup-Pickeachunitin(Anyunitsin(Region((MazeStartPointoffsetby4.0towards(4.0*90.0)degrees),1.0))ownedbyplayerAnyPlayermatchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If((Pickedunit)isinGROUP_MAZE_ALL_CELLS)==trueThenUnitGroup-Add(Pickedunit)toGROUP_MAZE_PILLAR_CELLSElse[color=red]Variable - Set point_currentpillar = (Position of (Random Any unit from GROUP_MAZE_PILLAR_CELLS))[color=red]
Unit Group - Pick each unit in (Any units in (Region(point_currentpillar, 1.0)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit Group - Add (Picked unit) to GROUP_MAZE_KEEP_CELLS
Unit Group - Remove (Picked unit) from GROUP_MAZE_DELETE_CELLS
Unit Group - Remove (Picked unit) from GROUP_MAZE_PILLAR_CELLS
General - For each real A from 1.0 to 4.0 with increment 1.0, do (Actions)
Actions
Unit Group - Pick each unit in (Any units in (Region((Maze Start Point offset by 4.0 towards (4.0 * 90.0) degrees), 2.0)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Picked unit) is in GROUP_MAZE_KEEP_CELLS) == true
Then
Unit Group - Add (Picked unit) to GROUP_MAZE_NEIGHBOR_CELLS
Else
Unit Group - Pick each unit in (Any units in (Region((Point((((X of point_currentpillar) + (X of point_currentneighbor)) / 2.0), (((Y of point_currentpillar) + (Y of point_currentneighbor)) / 2.0))), 2.0)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at mos and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Picked unit) is in GROUP_MAZE_ALL_CELLS) == true
Then
Unit Group - Add (Picked unit) to GROUP_MAZE_CONDEMNED_CELLS
Else
General - For each real A from 1.0 to 4.0 with increment 1.0, do (Actions)
Actions
Unit Group - Pick each unit in (Any units in (Region((point_currentpillar offset by 4.0 towards (4.0 * 90.0) degrees), 2.0)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Picked unit) is in GROUP_MAZE_DELETE_CELLS) == true
Then
Unit Group - Add (Picked unit) to GROUP_MAZE_PILLAR_CELLS
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Any units in GROUP_MAZE_PILLAR_CELLS) == 0
Then
Trigger - Run Maze Generation (Check Conditions, Don't Wait until it finishes)
Else
Trigger - Run Maze Creation (Check Conditions, Don't Wait until it finishes)
0
Thank you so much! I changed "Any units" to "living units" and it worked!
0
@s3rius: Go
Thank you so much! I changed "Any units" to "living units" and it worked!
0
@progammer: Go
I've just tried waiting 2 seconds and it will load fine, but as soon as the 2 seconds expire (in-game), the game will crash. Also, I've temporarily disabled the 3rd trigger for my tests but thanks for pointing it out :).
0
I have three triggers:
In trigger (2), the action "Variable - Set point_currentpillar = (Position of (Random Any unit from GROUP_MAZE_PILLAR_CELLS))"
(colored red) is causing the game to crash during loading. If I disable it, the map will load properly. If enabled, it will cause the game to crash when loading. Any help as to why this is happening and how to fix it will be greatly appreciated (and feel free to point out any other errors if you see them :P).
1)
2)
3)