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"

Casting failed between two widget blueprints

So, I have two widget blueprints(GameWin & MainMenu) What I am trying to do is to make a leaderboard for the player's scores. In the MainMenu Widget, I have 3 variables(Top Score1, Top Score2, and Top Score3) I need to compare these to the variable Score inside the GameWin widget. What I need to do is get the Top score variables into the GameWin blueprint, I'm trying to do this through casting(Don't know if this is the right way) but whenever I try to cast it, it always fails. See casting in the pic below: alt text

Product Version: UE 4.13
screenshot-31.png (245.1 kB)
more ▼

asked Nov 22 '17 at 06:57 AM in Blueprint Scripting

avatar image

10 2 6

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

1 answer: sort voted first

GetAllActors/WidgetsOfClass return the correct object type already. No need to cast here, as the helpful message states.

The cast may be failing because the object does not exist.

more ▼

answered Nov 22 '17 at 08:07 AM

avatar image

15.2k 77 25 62

avatar image Fantus_ Nov 22 '17 at 05:31 PM

Works like a charm, thanks.

(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