canT get the game to end.. ,feel so stupid :(

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

k0lpA

OMFG the cow bus !!
Aug 19, 2002
114
0
0
Canada / Quebec
Visit site
OK, I have a gamemode (subclass of Deathmatch) and I want the game to end.... I tried to call EndGame, it doesnt end.. I tried stuff like : bGameEnded = true;
TriggerEvent('EndGame', self, None);

nothing... happened.. :|

btw, I chose this lil green guy icon because its funny.. :p
 
Last edited:

Mychaeel

New Member
Check the implementation of the EndGame function in class DeathMatch (and in GameInfo); you'll see that just calling that function doesn't suffice.

For one, you have to specify a valid value for the "Reason" parameter, or EndGame in DeathMatch won't do anything. In addition to that, the EndGame function implemented in GameInfo calls CheckEndGame which must return True before the game actually ends.

So: Pass a valid "Reason" value to EndGame when you call it; and override CheckEndGame to have it return True when there's a valid end-game condition for your game type.