Page 1 of 1

Add a win/loss argument to GameOver call-in

Posted: 08 Aug 2010, 21:33
by zwzsg
In the call-in:

function widget:GameOver()
end

I want to know if it's a win or a loss. Currently, it's not very possible. I tried counting #Spring.GetTeamUnits(Spring.GetMyTeamID()), doesn't work because the player is already autoswitched to speccing another team when GameOver is called.

So my demand is to add an argument to GameOver to know it's a win or a loss.

Re: Add a win/loss argument to GameOver call-in

Posted: 08 Aug 2010, 22:04
by aegis
they get specced if they win?

Re: Add a win/loss argument to GameOver call-in

Posted: 08 Aug 2010, 22:50
by zwzsg
Indeed, "if Spring.GetSpectatingState() then" did the trick. Still feels ugly and prone to break.

Re: Add a win/loss argument to GameOver call-in

Posted: 08 Aug 2010, 23:07
by AF