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 fails after collapsing to function?


I have a weird issue with blueprints. This setup works (notice the "Cast To MyCharacter node" connected to the "Game Over Screen" function):

alt text While This one does not (I simply collapsed all the nodes after "DoOnce" into a function):

alt text

Cast to MyCharacter fails. Why?

Product Version: UE 4.8
a.png (110.0 kB)
b.png (65.1 kB)
more ▼

asked Aug 27 '15 at 05:20 PM in Blueprint Scripting

avatar image

85 13 16 95

avatar image Bproof Aug 31 '15 at 06:24 PM

Does anyone have any other ideas :) ?

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Another possibility is the input variable to the function.

Make sure both "Target" in the GameOverScreen function and "MyCharacter" in the GameOver function are of the type MyCharacter, not just a base Character.

Probably is, just thought I would mention it in case :)

more ▼

answered Aug 27 '15 at 05:29 PM

avatar image

3.1k 74 34 147

avatar image Bproof Aug 28 '15 at 10:33 AM

"MyCharacter" in the GameOver is set to the proper type, but "GameOverScreen" is a function in the MyCharacter blueprint, so the target is automatically MyCharacter. It still doesn't work.

(comments are locked)
10|2000 characters needed characters left

Maybe try deleting and remaking the cast node and DoONce node. I've had some weird referencing issue when nodes were collapse. Worth a try, cause it looks fine at first glance.

more ▼

answered Aug 27 '15 at 05:25 PM

avatar image

2.3k 114 61 233

avatar image Bproof Aug 28 '15 at 10:31 AM

No luck. Casting still fails.

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