Remove from parent error

Hello, i have one question for UE community,

I created a player controller, in this one I used a set timer so that when the user is inactive, a widget appears, I then added a remove from parent which is activated when a key is activated , however I get the error blueprint runtime error accessed none trying :confused:
Do you have any idea how to solve this problem?

Thanks you and have a good day !

1 Like

It’s unclear what you want to do. But here you are removing the widget before you even create it



Is this what you’re after:

Hello, sorry for my lack of information, in reality I would like that when the user is inactive, a small “clic-me” or “swipe me” logo appears on the screen, in order to encourage the user during a event show to use the application, and as soon as the user touches the screen, the logo disappears, and here the problem is that when the application is used, the remove from parent is constantly requested

I will try the solution you suggest

1 Like

That makes sense, the above should do it.

Thank you for your help, it no longer gives errors and works correctly, one last question, with this configuration, it works when I drag my mouse (or drag finger), however when I simply click on a button created by a widget, it does not interact not, any idea for this ?

1 Like

It’s not wired correctly. The bottom bit must come from the player moving again. See the tooltips I left.

Do you need to interact with the widget with a touch? If so, bind the touch or button click and connect it to the bottom bit.

unfortunately this is the only way for it to work in this configuration, or maybe I need to change the way activity is detected?

1 Like

Bind the button onclick to the bottom execution wire in my pic. The button will then dismiss the widget and cancel countdown.

This is the event graph of the player controller, the only OnClicked that I can put is Event ActorOnClicked, but that doesn’t work. (sorry I still lack knowledge)
and thanks for your time

1 Like

I still do not understand what you’re trying to do and which button is supposed to do what.

image

This is not a widget button. What do you want to touch? A button in the widget that we created? If so:

  • inside the widget with the button, ensure the widget button is flagged as variable:

image

  • bind its click after creating the widget:


What I understood:

  • the player is Idle → we show a widget after 2s
  • the player touches the widget, the widget goes away

Am I getting there?

Yep its exact, In my project, I have several levels representing an object of the range, each of the levels has a bp widget, each has several buttons therefore (button for configuration, play animation, 
), I would like each of its buttons makes the clic-me widget disappear (for this example), that the clic-me widget that we are trying to make disappear is only displayed when the user is completely inactive for a few seconds

each has several buttons therefore (button for configuration, play animation, 
), I would like each of its buttons makes the clic-me widget disappear (for this example), that the clic-me widget that we are trying to make disappear is only displayed when the user is completely inactive for a few seconds

So another widget dismisses the waiting widget? Where is that widget with all the buttons? Where is it created and referenced?

You say “Yep its exact”:

  • the player is Idle → we show a widget after 2s
  • the player touches the widget, the widget goes away

But it’s not, it seems. There are other widgets that need to control something now. The waiting widget is not the widget that will dismiss itself?

The code that we are doing here is placed in the player controller, and if possible I would like it to act on all the widgets of the project (each widget of each level), that it includes everything at the same time, if that is possible of course

I previously tried to place the code in a blueprint containing the buttons of a level, but this created errors

exactly =>
( * the player is Idle → we show a widget after 2s

  • the player touches the widget, the widget goes away )

to recap, player controller is bp containing the code,
Clic-me is a bp widget containing the mobile image (clic me) that should disappear when an activity is detected,
and 8 other blueprint widgets (1 per level) containing buttons (each button should make the clic me widget disappear)

It’s probably trivial, but I have no clue what you actually need. :frowning:


Could you please explain what you need in short bullet points, step by step. We went from handling a single invalid reference to managing a bunch of widgets across multiple levels
 And those widget are supposed to control something somewhere. I am lost.

Have the widgets call a custom event in the player controller then.

  • custom event dismissing the waiting widget:

  • in control widget: Get Player Controller → Cast → call Custom Event

But honestly, why even do all this? Why can’t the waiting widget dismiss itself. Why have everybody involved in something that can be handled by the waiting widget internally. Make it focusable, give it focus. Whatever input happens next will be handled by the waiting widget, making it go away.

Perhaps I am missing the point, though.

sorry for my bad english, that probably didn’t help (i’m belgian)

I would like to make this as simple as possible, but I don’t know how to do it, I admit that I am learning day by day, and here, at the end of the week, my project must be finished because the show starts this weekend. end in a foreign country (germany) and i end this with a little pressure

Try the casting I mentioned above. Essentially, your level control widgets can tell the player controller to hide the waiting widget. It could look like so:

Placed in and called by any of the widgets that need to dismiss the waiting one.


Your English is more than fine, it’s a mixture of having our wires crossed and me being in the middle of the very 1st morning coffee 
 :coffee:

I’m currently testing your solution, it makes the widget disappear when I click on the button, I’m making progress thanks to you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.