SLIC-Reference : GameOver
CTP2 Bureau
The Modding
Apolyton CTP2 forums
Apolyton CTP2 archives
Source Code Project SVN

SLIC-Reference : : GameOver  

Arguments: player, reason Type: int

End the game for the given player

Reason can be either 1 or 2, 1 meaning the player won, 2 meaning they lost. This is especially useful for scenarios with specific victory conditions. Example:
//player[0] wins the game
GameOver(player[0], 1);


SFN_ERROR Slic_GameOver::Call(SlicArgList *args)
	if(args->Count() != 2)

	sint32 player;
	if(!args->GetPlayer(0, player))

	sint32 reason;
	if(!args->GetInt(1, reason))

	if(reason == 0) {
		g_player[player]->GameOver(GAME_OVER_LOST_OUT_OF_TIME, -1);
	} else if(reason == 1) {
		g_player[player]->GameOver(GAME_OVER_WON_SCENARIO, -1);
	} else if(reason == 2) {
		g_player[player]->GameOver(GAME_OVER_LOST_SCENARIO, -1);
	return SFN_ERROR_OK;

Information last updated by BureauBert on 23.11.2010

User Comments:

Using this form you may add your own observations concerning the above item, e.g. additional hints for usage, limitations, oddities etc. Please note this is not the place for asking questions or carrying out discussions about modding - please refer to the Apolyton CTP2 Modification Forum on that purpose.

Subject / Title*:
(A maximum of characters left)
Your name:*
Your website (URL):

*) Required fields

No user comments yet.

This site is currently maintained by: BureauBert (Webmaster)  Maquiladora (Manager)  Legal Notice: Legal Notice Statistics: 127947 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne
Share this page:  VK Facebook Twitter LiveJournal OK MR Google+ LinkedIn tumblr Pinterest Blogger Digg Evernote