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"

PlayerState has ReadOnly Score variable

I created a new BP extending PlayerState and tried adding a Score variable. That failed, because it already inherited one from PlayerState. However, Score, as well as PlayerName, are read only. Why is this?

Product Version: Not Selected
Tags:
more ▼

asked Sep 09 '14 at 03:53 AM in Blueprint Scripting

avatar image

OhiraKyou
306 21 43 54

avatar image pr4wl Nov 06 '14 at 06:25 AM

Also am confused by this. I've been doing searching but can't find anything regarding how to use this.

avatar image pdinklag Feb 04 '15 at 05:39 PM

This is completely nuts indeed. As it is now, it's completely useless for Blueprints.

avatar image JoshyMW Feb 18 '15 at 10:38 PM

I am a little frustrated with this, and surely this is rather bad to have been not removed or not fixed or at least some explanation to this. It is a huge pain to not be able to use a variable called Score because a dud variable is already there and I would guess extra 'tiny amount' of stress on initial bandwidth seeing as it is replicated...

avatar image Enlo Apr 27 '15 at 11:15 AM

The playerName is readonly, because (depending on which online system you use) this is your network name, eg. the steam pseudonym. Since leaderboards are also implemented in the online system, I guess it's also populated from there.

PS: If you ask me, they should not be readonly or they need a online system which let's you edit it.

avatar image MrMcKvarz Oct 01 '18 at 01:21 PM

Not only it is useless in blueprints, but it is also useless in c++. There is at least a public function that allows you to change player name, no such thing for scores. It's just pissing me off that I have to make my own class and make the same variable.

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

1 answer: sort voted first

No, people think online services are super impotent and required, reality is way different. UE4 multiplayer implementation is made so server can work independently and don't need any online service to run, those are just extra features, not to mention online services are mostly only social services.

No. 1 reason properties are read only is because just setting those varbales don't execute any update code, to force higher level programmers to use different method properties are either protected in C++ or read only in blueprint, or there compatibility issues with blueprint workflow (probably due to fact it's replicated?) and UE4 expect you to use C++ which is seems to be the case with Score.

In case of player name, it is as explayed above, it not about online service is to force you to call a function:

http://api.unrealengine.com/INT/API/Runtime/Engine/GameFramework/APlayerState/SetPlayerName/index.html

But for some reason it is not binded in to Blueprint

more ▼

answered Oct 01 '18 at 01:06 PM

avatar image

Shadowriver
37.3k 936 172 1116

avatar image MrMcKvarz Oct 01 '18 at 04:22 PM

OnRep_Score is empty, so it doesn't do anything to actually replicate the variable. Even if I wanted to override that and make it update myself there is no way I can do that in a derived class. It seems that someone just used a wrong protection level while writing this class.

(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