Snippet Disable Singleplayer Mode

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
It doesn't crash for me in single player, testing it with a friend.
 

Azlier

Old World Ghost
Reaction score
461
It's not supposed to crash. It's supposed to end the game. Does it at least do that?
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
It's not supposed to crash. It's supposed to end the game. Does it at least do that?

No I meant something else, I thought I made an error in writing the code. :S

Edit: It didn't end the game or do anything at all... Was that supposed to happen?
 

Azlier

Old World Ghost
Reaction score
461
I don't know. My script has a syntax error, and Renendaru vanished when I needed her most.

Fixed version:
JASS:
function PreloadFiles takes nothing returns nothing
    if ReloadGameCachesFromDisk() then
        call SetPlayerName(GetLocalPlayer(), "This map cannot be played in single player.")
        call EndGame(true)
    endif
endfunction


EDIT: It actually works. Yay.

The SaveGameCache trick doesn't work, though. ReloadGameCachesFromDisk does.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
It does seem to work, ended in single player, but not in Bnet.
 

Jesus4Lyf

Good Idea™
Reaction score
397
Well done!

A_winner_is_you.jpg


Wanna name it a .mdx file and explain how to implement it? :D

I love how subtly off topic this thread is while still remaining on topic and achieving useful stuff...
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Better yet, a simple demo map. All you have to do is run Preloader(Model.mdx) on init. Just import Model.mdx from the test map.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top