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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to make a score system in relation with every characters ?

So I want to make a score system based on collectables, that mean when any of my character collect the object, it is added to the "coins number" counter. I want to put that in a UI, but then when I change of pawn, the score is not the same.

exemple : if player 1 collect 10 coins, it wrote 10 on my HUD, it's normal. but when I change to player 2, the coins counter is still at 0.

I want to make a counter in link with every character.

is that with the player state blueprint class ?

Product Version: UE 4.18
more ▼

asked May 13 '18 at 02:57 PM in Blueprint Scripting

avatar image

1 3 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You can store scores in any class you want but if you put it in the pawn, you lose the info every time the pawn is destroyed.

Player State is probably the best place to put it for an individual player.

If you want the players to share the same score it can go in the game state.

If you need to, you can make your own classes for any purpose too. Just remember, Actors are destroyed when you switch to another level, but Objects can persist.

But I prefer player state for individual players' information that must persist between pawn deaths or unpossessions, and game state for information that must be shared between players, and Game Instance for information that must persist between levels.

more ▼

answered May 13 '18 at 08:44 PM

avatar image

3.8k 18 20 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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