Game End Functions

  • 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.

Kangus

Zombie on your pwn!
Jan 29, 2001
978
0
16
Illinois, USA
www.planetunreal.com
In a game type, I need to call a function whenever a match is ended, be it via score/time limit being hit or pressing escape and starting a new match midgame. I've tried putting the call in both RestartGame() & EndGame(), but it seemes neither of these gets called when you press escape and start a new game... any idea where I should call the function from?
 

Shiit

Shiit
Dec 19, 2000
168
0
0
Dunno whether this'll work, but you could try the "Destroy()" function of the GameInfo class.
I don't even know whether it's called like that... Anyway, it's the function that's always called when an object is destroyed.
 

Brood_of_Evil

Selene's martyr
Nov 3, 2001
147
0
0
45
Look outside your window!
Visit site
There's a variable in game info called bGameEnded, you can try test the condition of the variable, if it's true then you can execute some code after it.

There's also a function called ResetGame(), maybe you can try that out for when you restart a new game. Im not sure though.
 
Last edited: