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. 

Why do I need to cast to one actor after getting it from a class but not the other?

I'm making pong as a mini project and came into a strange issue. While doing my score system I get the actor representing the score from "get all actors from class" node then "get" then set it's text render plus 1 when a player scores. alt text alt text

This works fine, however, when I try to do the same thing for the opposite score actor I can't connect the "get text render node as it does not appear, I instead need to directly cast to the score actor and change it.

alt text

alt text

This still works in the end but I'm confused as to why I can get the text from just the "get" for one actor and not the other, the two actors are exactly the same other than the name, so I'm pretty stumped.

Product Version: UE 4.22
screenshot-23.png (313.8 kB)
screenshot-31.png (361.9 kB)
screenshot-32.png (302.5 kB)
screenshot-24.png (342.9 kB)
more ▼

asked May 19 '19 at 05:03 PM in Blueprint Scripting

avatar image

7 2 3 7

avatar image StreamLined May 19 '19 at 05:10 PM

Also the comments were mixed up at the time, so sorry if that causes confusion, but they're irrelevent so just ignore them.

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

1 answer: sort voted first

My bet is that Right Score has a Text Render and Left Score does not.

Also, Get All returns correct class already, no need to cast at all. Sometimes if you copy / paste that node or use the filter, the node does not get updated correctly. Right click it and refresh manually.

more ▼

answered May 19 '19 at 07:11 PM

avatar image

14.7k 76 25 61

avatar image StreamLined May 19 '19 at 07:51 PM

As I said the two actors are exactly the same other than name so they both have text renders and I know I shouldn't need to cast after getting it hence my confusion. Refreshing manually seems to have fixed the issue so I believe it was indeed some sort of copy paste problem so thank you for making me aware that that is a thing.

(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