How do you set a points limit/frag limit you your game?

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?

I obviously don’t know your exact setup.

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.

Here’s my points set-up so far.
Pickup

Character BP (calculates the points)

15104-characterbppoints.png

BPI (records the points of the player)

16370-bpi-currentplayerscore.jpg

HUD (Points being drawn)

I’ll give your method a try and see how it goes.

Hey Erasio, your idea seemed to work fairly well!

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!”

HUD

End Result!

Thanks for your help!

You’re very welcome!

I’m always happy to help! :smiley: