I keep getting “Blueprint Runtime Error: “Accessed None trying to read property GameWidget”. Blueprint: GameCon Function: Execute Ubergraph Game Con Graph: EventGraph Node: Set InteractTextVis” Error and I don’t know why.
I have the Open Level creating the Widget and some blueprint that makes it visible or hidden, any ideas what i could be doing wrong?
Can you tell what is the scenario here? Is it absolutely necessary for the level blueprint to create the widget? Why not create it in the same object that needs to use is - the one with the Collision Event.
Making interactive NPC’s, pick up items and doors.
But I don’t feel like any of that information is going to help me modify widgets with blueprints in the aria of text, swap images or hide and show something.
Makes sense, create the widget in the actor that initiates the interaction - Pawn or the PlayerController - it makes it easy to access. I’d avoid using Level Blueprint for things that are not level specific.
This has absolutely nothing to do with it. It’s a very basic error - you’re trying to access an object through a variable that has nothing assigned to it.
When I don’t “save all” the NPC script runs before the level script and everything works. When I “save all” the level script runs first and nothing works
but I need the level script to run first so I can add the game widget first so i can add the widget to the viewport otherwise it shouldn’t run
I think I found the problem
I cant use “Event BeginPlay” on my NPC player, it starts too soon.
Shoot how am I going to find and tell multiple possible npc’s after creating a widget to run custom npcGetWidget event to get all widgets of class.
seriously I don’t know how to do that, and I can’t think of anything better.
Event dispatchers spring to mind You can send out an event dispatch call to your game instance, then when you spawn your npc’s you bind to that event dispatcher so that when it is called, everything bound to it gets notified of it being triggered.