x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: Not Selected
Tags:
more ▼

asked Sep 25 '14 at 11:07 PM in Blueprint Scripting

avatar image

Kagamusha
175 37 31 42

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Sep 26 '14 at 01:40 AM

avatar image

Erasio
5.9k 291 86 291

avatar image Kagamusha Sep 26 '14 at 11:46 AM

Here's my points set-up so far.
Pickup alt text

Character BP (calculates the points) alt text

BPI (records the points of the player) alt text

HUD (Points being drawn) alt text

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

avatar image Kagamusha Sep 26 '14 at 02:06 PM

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 alt text

End Result! alt text

Thanks for your help!

winconditionmet.jpg (131.0 kB)
endresult.jpg (68.8 kB)
avatar image Erasio Sep 26 '14 at 11:35 PM

You're very welcome!

I'm always happy to help! :D

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question