Author Topic: Map changing  (Read 1791 times)

0 Members and 1 Guest are viewing this topic.

Offline Savage

  • Soldier
  • **
  • Posts: 155
Map changing
« on: April 23, 2015, 09:31:00 am »
Hi, I would like to know if that's possible to catch that event when map is changing, I mean when timeleft is 0, some1 scores the last flag etc. then the game is paused(but Game.Paused is set to false lol  :o, looks like it's different pause cause we can stop map changing by /pause command and /unpause and have fun on the same map haha). I was trying TMap.OnBeforeMapChange event but it's working after map is loaded without objects and spawns or something like that. My last hope is probably checking every "map change" events like flag score limit, timeleft, commands(nextmap, map), kills etc (Probably not possible to check Map.NextMap or Map.SetMap from SC3). I'm ending my vote script(in SC3) and i need that 1 thing cause while vote for next map is enabled and for e.g. admin changes the map on next(now game is "paused" for few seconds and next map is "1") and vote will succeed we will have twice /nextmap(Now next map is "2").
« Last Edit: April 25, 2015, 06:19:57 pm by Savage »

Offline JotEmI

  • Soldier
  • **
  • Posts: 188
Re: Map changing
« Reply #1 on: April 23, 2015, 09:54:53 am »
I believe once there was an event OnRoundEnd() which pretty much did what you need but it's been long gone. I think it was implemented by EnEsCe in his last version which he didn't share with the new devs. It's been sitting here as a suggestion for quite some time http://forums.soldat.pl/index.php?topic=19565.msg238435#msg238435.

EDIT: Falcon mentions OnGameEnd() here http://forums.soldat.pl/index.php?topic=26661.msg513445#msg513445 but I don't see it in SC2 nor SC3 documentation. Can someone confirm that this event really exists?

EDIT2: Well, OnGameEnd() exists in SC2 but I'm not sure when exactly is it called. When I've tried smth like this:
Code: [Select]
procedure OnGameEnd();
begin
WriteConsole(0,'Map ended',MsgColor);
end;
the message 'Map ended' appeared in the console AFTER new map has been loaded.
« Last Edit: April 23, 2015, 10:10:37 am by JotEmI »

Offline Savage

  • Soldier
  • **
  • Posts: 155
Re: Map changing
« Reply #2 on: April 23, 2015, 10:38:11 am »
It's sad, but I have hope they will add that feature in future.

Offline BaneOfDeath

  • Major(1)
  • Posts: 11
Re: Map changing
« Reply #3 on: May 04, 2015, 07:12:17 am »
EnEsCe! EnEsCe! EnEsCe!  I would really wanted to he came back!