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"

Access Actor variable from level blueprint

This is based on the sidescroller template.

alt text

What should happen is this:

When 1 is pressed, get all people actors and for each of them print the name to screen & check if the variable "Right" is set. If Right is set move to right target if not move to left target. However my "people" always move left and i get the error "Error Accessed None 'PeopleBP' from node Get All Actors Of Class in blueprint SideScrollerExampleMap" after i hit play and exit again :(

"People" is a child of the Sidescroller character:

alt text

My variable in the people blueprint looks like this:

alt text

It's exposed at spawn and set to public

I really don't know why it doesn't work :(

I would appreciate any idea! :)

Product Version: Not Selected
level.jpg (97.2 kB)
people.jpg (52.4 kB)
variable.jpg (43.0 kB)
more ▼

asked Mar 10 '15 at 07:20 PM in Blueprint Scripting

avatar image

1 1 2 2

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

3 answers: sort voted first

It doesn't look like you are assigning PeopleBP any value, at least in the provided screenshots.

Are you setting PeopleBP to anything?

more ▼

answered Mar 10 '15 at 09:50 PM

avatar image

3.1k 51 120 487

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

In general "Accessed none" means your reference is invalid so check where it tells you it's broken.

In this case we have "Error Accessed none "PeopleBP"". That tells us quite a lot. In this script we have exactly one node called PeopleBP so we don't even have to find out which one is meant. You want to check "Right" for each "People" actor. The variable PeopleBP however references simply an actor which you don't set in this script.

I highly assume you never set this variable at all and it's just an empty reference.

...so the very simple and easy fix is to just use the output of your "Array Element" from the ForEachLoop for your "GetRight" (the boolean). You might have to cast it to "People" first which you can do via a simple "Cast to People" node and use the output of that.

I hope this helps.

Cheers :)

more ▼

answered Mar 10 '15 at 09:52 PM

avatar image

5.9k 291 86 293

avatar image Ize Mar 11 '15 at 07:15 AM

I didn't know about the casting stuff so i'll read up on that first :)

I'll try your suggestion later when i'm back at home and then report back.

Thanks alot! :D

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

Cast to people worked fine! Thanks again! :D

more ▼

answered Mar 11 '15 at 05:19 PM

avatar image

1 1 2 2

avatar image Erasio Mar 11 '15 at 06:16 PM

Could you accept an answer to make it clear to people browsing the answerhub that this is solved?

Thanks :)

avatar image Ize Mar 12 '15 at 08:19 AM

I would if, if i could ;)

I can't upvote because i get a popup that says: "Request method not allowed" in chrome, firefox and ie. I also don't see any button to accept an answer.

avatar image Erasio Mar 12 '15 at 08:50 AM

Oh. Well could you tell me which one you would like to accept and I do it this time

Also are you using the answerhub in German? Because for some reason that was broken recently and I'm not sure if it's fixed by now.

avatar image Ize Mar 12 '15 at 10:59 AM

Yes i used answerhub in german... switched it back to english and now everything works fine. Thanks... again. ;)

(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