- Joined
- Mar 14, 2014
- Messages
- 1,212
Why is the preview image: "You are viewing a replay"?
GameStatus

Events


Time - Elapsed game time is 0.00 seconds

Conditions

Actions


-------- Initialize --------


Set GAME_STATUS_OFFLINE = 0


Set GAME_STATUS_ONLINE = 1


Set GAME_STATUS_REPLAY = 2


-------- Find a playing player --------


Set GameStatus_Temp = 1


For each (Integer GameStatus_Temp) from 1 to 12, do (Actions)



Loop - Actions




Set GameStatus_TempPlayer = (Player(GameStatus_Temp))




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(GameStatus_TempPlayer controller) Equal to User






(GameStatus_TempPlayer slot status) Equal to Is playing





Then - Actions






Set GameStatus_Temp = 99





Else - Actions


-------- Find out the game status --------


Unit - Create 1 Footman for GameStatus_TempPlayer at (GameStatus_TempPlayer start location) facing Default building facing degrees


Selection - Select (Last created unit) for GameStatus_TempPlayer


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Last created unit) is selected by GameStatus_TempPlayer) Equal to True



Then - Actions




Custom script: if (ReloadGameCachesFromDisk()) then




Set GameStatus = GAME_STATUS_OFFLINE




Custom script: else




Set GameStatus = GAME_STATUS_REPLAY




Custom script: endif



Else - Actions




Set GameStatus = GAME_STATUS_ONLINE


Unit - Remove (Last created unit) from the game


Set GameStatus_Initialized = True
Test

Events


Time - Elapsed game time is 0.01 seconds

Conditions

Actions


-------- Make sure the system was initialized --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




GameStatus_Initialized Equal to False



Then - Actions




Game - Display to (All players) the text: GameStatus has not ...




Skip remaining actions



Else - Actions


-------- Display the game status --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




GameStatus Equal to GAME_STATUS_OFFLINE



Then - Actions




Game - Display to (All players) the text: This game is offlin...



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




GameStatus Equal to GAME_STATUS_ONLINE



Then - Actions




Game - Display to (All players) the text: This game is online.



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




GameStatus Equal to GAME_STATUS_REPLAY



Then - Actions




Game - Display to (All players) the text: You are viewing a r...



Else - Actions