I’ve got a points system working in my game, however my latest struggle is setting a frag limit and triggering a game over event.
Would this be stored in the game mode or playercontroller?
I’ve tried to cast to player 0 and get their current score. Then I set it so if player 0’s score >=10 then display a string or draw text on the HUD saying “Player 1 Wins!”.
I’m pretty sure I’ll need to make the “game over” part a function to be called, however my attempts at getting this text to draw upon those conditions has failed so far.
Has anyone successfully created a frag/score limit in a local splitscreen multiplayer game yet?
You probably have the score in your character or controller but you must have a place where you add it.
I personally would set up a variable called “PointLimit” which you check just after you added a point to the current score if the current score is equal to it set a “GameOver” variable in your gamemode to true and if you so desire pause the game.
Inside of your HUD you check for that variable on “EventReceiveDraw” and if it’s ture well… draw the game over screen with all information you want.
I set my HUD up to print the players name as they won and by using my points BPI, I have managed to do the equation of “is the score =>10, if so then pause the game and print a string!”