HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to detect when a game is restarted ?

04-25-2009, 08:01 PM#1
Troll-Brain
Is there a way to know if a game is restarted or not ?
I don't talk about a loading game, but about a restarted game (end game -> restart mission).
I've tried to use cache and also checking the string "table", but it seems that it doesn't work.
Any idea ?

I've noticed that if you change the name of the player during the game, when you restart the game, the name will be still the same and not the original one.
04-26-2009, 03:57 AM#2
Ammorth
add a hidden characters to the name? "|r"
04-26-2009, 06:36 AM#3
DioD
there is special flag with RELOADED keyword try to play with it.
04-26-2009, 07:38 AM#4
Troll-Brain
Quote:
Originally Posted by Ammorth
add a hidden characters to the name? "|r"
An then if you use a spoofer it can fail in theory.

@DioD :
I've missed this constant, hovewer it seems it always return false
Collapse JASS:
if IsMapFlagSet(MAP_RELOADED) then
    call BJDebugMsg("reloaded")
else
    call BJDebugMsg("not reloaded")
endif