Uncle
Warcraft Moderator
- Joined
- Aug 10, 2018
- Messages
- 8,351
Edit: Found the problem, it was oddly specific to the tools I use. But this may still be worth reading if you're interested.
Hello friends, this may be an already documented issue but I want to discuss it here. This is in regards to the loading process (Map initialization) and what can go wrong there.
First off:
1. I play in Borderless Window mode.
2. I'm testing my map offline.
3. I'm on the latest patch.
4. I'm in Lua-mode.
5. I'm launching my map from Visual Studio using the WCSharp library: Home.
The problem is that some Actions fail to run, or that's my suspicion. This appears to only happen if I'm minimized when the map finishes loading. I have a habit of alt-tabbing a lot, so often times I'll finish loading -> press a key to proceed -> and alt-tab in basically the same frame.
One issue in particular is from these triggers:
This could also be related to WCSharp which I mentioned above. I'm currently trying to replicate the issue when launching the map from the World Editor instead of through that tool, and I'll edit this with a confirmation soon.
Edit 1: After testing some more, it seems like the issue happens even if I use Elapsed Time events instead of Map Initialization. Also, I'm pretty certain it's directly related to WCSharp, it seems like my Main() function - which is meant to run when the game starts, is not running if I'm minimized.
Edit 2: I've managed to remedy it a bit. I deleted the "Disable user control" stuff and found that what's happening is the game gets locked in a paused state. I can't move my camera or click anything, but I can open menus. If I open say the Message Log, and then close it, the game is resumed and the rest of my logic runs without issue. So this appears to be a Singleplayer-only issue which I can remedy with some frame manipulation. The "Resume game" action didn't work for whatever reason... It's a like a pseudo-Pause.
Edit 3: An example of the remedy (again, this may only pertain to WCSharp users):
Any ideas? Also, thank you for your time
Hello friends, this may be an already documented issue but I want to discuss it here. This is in regards to the loading process (Map initialization) and what can go wrong there.
First off:
1. I play in Borderless Window mode.
2. I'm testing my map offline.
3. I'm on the latest patch.
4. I'm in Lua-mode.
5. I'm launching my map from Visual Studio using the WCSharp library: Home.
The problem is that some Actions fail to run, or that's my suspicion. This appears to only happen if I'm minimized when the map finishes loading. I have a habit of alt-tabbing a lot, so often times I'll finish loading -> press a key to proceed -> and alt-tab in basically the same frame.
One issue in particular is from these triggers:
-
Map Init
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Cinematic - Disable user control for (All players).
-


Cinematic - Fade out over 0.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
-
-
Map Start
-

Events
-


Time - Elapsed game time is 0.50 seconds
-
-

Conditions
-

Actions
-


Cinematic - Enable user control for (All players).
-


Cinematic - Fade in over 0.10 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
-
This could also be related to WCSharp which I mentioned above. I'm currently trying to replicate the issue when launching the map from the World Editor instead of through that tool, and I'll edit this with a confirmation soon.
Edit 1: After testing some more, it seems like the issue happens even if I use Elapsed Time events instead of Map Initialization. Also, I'm pretty certain it's directly related to WCSharp, it seems like my Main() function - which is meant to run when the game starts, is not running if I'm minimized.
Edit 2: I've managed to remedy it a bit. I deleted the "Disable user control" stuff and found that what's happening is the game gets locked in a paused state. I can't move my camera or click anything, but I can open menus. If I open say the Message Log, and then close it, the game is resumed and the rest of my logic runs without issue. So this appears to be a Singleplayer-only issue which I can remedy with some frame manipulation. The "Resume game" action didn't work for whatever reason... It's a like a pseudo-Pause.
Edit 3: An example of the remedy (again, this may only pertain to WCSharp users):
-
Map Initialization
-

Events
-


Time - Elapsed game time is 0.01 seconds
-
-

Conditions
-

Actions
-


Custom script: print("--- MAP INIT ---")
-


-------- --------
-


-------- This is a fix to a rare "pause" glitch that happens in SP testing: --------
-


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



If - Conditions
-




(Number of players in (All players)) Equal to 1
-
-



Then - Actions
-




Custom script: local origin = BlzGetOriginFrame(ORIGIN_FRAME_SYSTEM_BUTTON, 2)
-




Custom script: BlzFrameClick(origin)
-




Custom script: local closeBtn = BlzGetFrameByName("LogOkButton", 0)
-




Custom script: BlzFrameClick(closeBtn)
-
-



Else - Actions
-
-


-------- --------
-


Wait 0.01 game-time seconds
-


// I run a bunch of triggers here to finish the setup process (hidden to keep this post clean)
-
-
Any ideas? Also, thank you for your time
Last edited:


