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"

Impossible to cast/pass variables? Out of Bounds error on GetAllActors

I cannot for the life of me succeed in modifying a variable between different blueprints. I've looked up dozens of solutions, tried multiple methods, with these in particular: https://answers.unrealengine.com/questions/19126/blueprints-int-a-a-1.html ...and also studied Tom's very detailed youtube video which is linked to via that example, but what seems to be happening is that the casting is failing, and in the log, there is an error that says: "Attempted to get an item from array CallFunc_GetAllActorsOfClass_OutActors out of bounds [0/0]!"

My graphs are posted below - it is more or less the same as demonstrated in the above examples, and I remembered to make sure my variables are assigned to the correct variable type, the eyeballs are all set to public, etc. The BP's used are the MyCharacter from the ThirdPerson Example (built manually through the instruction video) and the other is derived from HUD, based on what was demonstrated in Tom's video. This is a pretty basic goal to just add to a score between different blueprints, but I've been at this for days and about to give up (or die from an energy drink overdose)... I'm not even sure if it is something I am doing wrong or some kind of glitch. Either way I'm really starting to miss UE3 Kismet where things actually made sense. Any assistance to help me understand what is going on here would be greatly appreciated. Thank you. alt text

Product Version: Not Selected
ue4castfailing.jpg (423.2 kB)
more ▼

asked Jun 18 '14 at 07:53 PM in Blueprint Scripting

avatar image

18 2 6 8

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

1 answer: sort voted first

What I wrote here before was wrong, what you are doing to get the HUD actually works for me. Have you set your HUD class in the Project settings? It might spawn the wrong HUD class so no actors of your type are found. Everything else I said is still valid: To access your HUD you can use the GetHUD function on the PlayerController (use GetPlayerController to get that). In general you should check your variables before calling functions on it. Like check the count of the array returned from GetAllActorsOfClass or call IsValid on TheHUDVar before calling ScoreUp on it.

more ▼

answered Jun 19 '14 at 09:19 PM

avatar image

Alexander Mandt
61 2 3 5

avatar image princemoonrise Jun 20 '14 at 08:51 AM

Thanks, as you mentioned, it turned out that it was set to the Default HUD and not my custom HUD in the Project Settings. (Maybe there needs to be a warning for calling functions from improperly assigned/unassigned classes?). It seems to be working correctly now!

(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