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"

Adjust client Player variables outside Player class

Hi,

I'm trying to turn my player invisible with the use of an external blueprint actor, which can be seen as an usable powerup. However it seems that I'm not allowed to adjust the player externally.

If I put everything in the PlayerPawn itself it is working: alt text

However if I try to spawn an actor which handles the invisibility, it isn't working as expected. The players still sees itself and only the server can make itself invisible for itself. alt text alt text

Does anyone know what I'm doing wrong? Or maybe it is not possible to adjust the player anywhere else than in the Player class itself?

Product Version: Not Selected
Tags:
more ▼

asked Dec 09 '14 at 12:18 PM in Blueprint Scripting

avatar image

stefanorie
23 2 5 7

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

1 answer: sort voted first

get player character then from there cast to mycharacter

more ▼

answered Dec 09 '14 at 02:59 PM

avatar image

sgtfluffybutt
90 9 15 19

avatar image stefanorie Dec 09 '14 at 03:55 PM

Ah how could I miss that. However when I cast the player for the first time, it gives an Cast Failed error. After that it works flawlessly. How can I fix that? alt text

errorlog01.jpg (52.0 kB)
avatar image Adam Davis STAFF Dec 09 '14 at 04:03 PM

Hi stefanorie,

The Accessed None in the construction script (if you have no nodes in the construction script that may be causing it) is a known issue and shouldn't impact performance. Does the blueprint seem to work despite the failure? If so it is most likely this known bug.

avatar image stefanorie Dec 09 '14 at 04:33 PM

Hi, Well it only doesn't work the first time a call it. After that it seems to work fine. However it also needs to work the first time, because it's gameplay important. Is there any workaround for this?

avatar image Adam Davis STAFF Dec 09 '14 at 06:11 PM

If you could, put a break on your cast and then attempt to PIE for the first time, see what information is getting passed to the node. Additional put a print string on the fail condition and see if that is going through or if the cast is just not responding at all.

avatar image stefanorie Dec 10 '14 at 10:49 AM

I just added a delay of 0.1 seconds before the player turns invisible, it works great now. I think it has something to do with the replication of the player in the same Game Tick as changing a value of that player.

(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