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"

Why does this not work?

I've been using blueprints for a little bit, I'm not that new, but I'm also not that experienced; however, more recently I've been constantly plagued by this issue: "Blueprint Runtime Error: Accessed None Trying to Read Property." Now I can understand why some things wouldn't work because of this, but I can't even call a custom event from a different blueprint that literally only prints text. I would be most appreciated if someone could tell me as to why this is not working, and what I need to do to fix it.

Here are screenshots of a test project I made to showcase this issue:

http://prntscr.com/isy826 This is the blueprint containing the custom event. http://prntscr.com/isy8jd This is the blueprint calling the custom event. http://prntscr.com/isy8vw This is the error I keep getting.

Thanks for any future answers.

Product Version: UE 4.19
more ▼

asked Mar 18 '18 at 07:16 PM in Blueprint Scripting

avatar image

1 1

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

1 answer: sort voted first

Hi, in the 2nd screenshot where the Ref1 is, try to add at Event Construct this:

create widget > widget1 > promote to variable Ref1. then when the button is pressed, add to viewport (target ref1), then call the custom event thats in it.

more ▼

answered Mar 18 '18 at 07:35 PM

avatar image

34 1 6

avatar image Draining Mar 18 '18 at 07:51 PM

Thank you, that does work. But why exactly does that work instead of how I had it before? Isn't it still just referencing that blueprint?

avatar image SB1985 Mar 18 '18 at 07:57 PM

You did set the reference, but you didn't "feed" anything into the variable, plus the widget never got created and shown on screen, so it tried to call an event that doesn't exist yet.

avatar image Draining Mar 18 '18 at 08:00 PM

I had created the widget in the level blueprint, just forgot/didn't put a screenshot of it. Yeah I guess I didn't feed anything into the variable, I just don't seem to understand why the reference would need a value since I'm just calling an event from it.

avatar image SB1985 Mar 18 '18 at 08:13 PM

It's the same for actors, you need to "Cast to" then promote to a variable, then it will work. The reference in the variable is more like a "what it expects" kind of thing. To make it easier to filter out things, for example if you put a weapon base class there, it will show you only it and its child classes when you call the variable from somewhere, but to make it work, you need to set an actual thing what it is at begin play.

avatar image Draining Mar 18 '18 at 08:15 PM

Ahhh it makes a lot more sense now, thank you very much for your answers :)

avatar image SB1985 Mar 18 '18 at 08:19 PM

No problem :)

(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