# Novice blueprint logic problems

**URL:** <https://forums.unrealengine.com/t/novice-blueprint-logic-problems/1167124>\
**Category:** Game Development\
**Tags:** unreal-engine, question\
**Created:** [May 16, 2023, 3:00am UTC](https://forums.unrealengine.com/t/novice-blueprint-logic-problems/1167124 "2023-05-16T03:00:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CEN1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CEN1](https://forums.unrealengine.com/u/CEN1)\
**Post date:** [May 16, 2023, 3:00am UTC](https://forums.unrealengine.com/t/novice-blueprint-logic-problems/1167124/1 "2023-05-16T03:00:53Z")

</div>

I’m trying to implement a communication pass between actor and widget, but it’s always unsuccessful, can you help me to see what is the problem? The logic I implemented is to first create a widget control inside the actor by clicking the mouse event and adding it to the viewport, and then finish processing a variable by clicking the button event inside the widget, and then I need to get the results of the variable after the widget runs to do branching in the actor, so I created a new variable inside the actor (which inherits the widget class), and then get the value of the variable by getting the widget’s variable to get the value of the variable. I need to get the result of the variable after the widget is run to make a branch judgment in the actor, so I create a new variable in the actor (the class that inherits the widget) and get the result by getting the value of the widget’s variable, but I won’t get the result of the widget’s run; if I add a new control in the actor to inherit the widget, it will prompt the parent class with a problem during the blueprint call.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 16, 2023, 12:23pm UTC](https://forums.unrealengine.com/t/novice-blueprint-logic-problems/1167124/3 "2023-05-16T12:23:56Z")

</div>

And now… ( drum roll ) the correct answer 🙂

Very similar, in fact. When you make the widget, give it an actor reference variable, and expose it on spawn, like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/f/a8faf3b501c5aea5aa17535d69c103a67e73d6ec.png)

When you create the widget ( from wherever ), you say

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/d/93d397c326ea351d6d4765727dd24d4fd675238d.png)

The widget responds to the actor with a blueprint interface

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/5/df5333fcae6dd546aac538ed85d6f789ff0ec6f6.png)

That call gets caught in the blueprint

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/4/5a454c187eddc09f0b28cb5c833f2ae758ead133.png)

The interface definition

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/2/af28d7421629593527cf6a589398bff0d7fbc75f.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 16, 2023, 12:40pm UTC](https://forums.unrealengine.com/t/novice-blueprint-logic-problems/1167124/4 "2023-05-16T12:40:39Z")

</div>

It’s not a really a clear ask. @CEN1 Can you simplify it somehow for us?

> first create a widget control inside the actor by clicking the mouse event and adding it to the viewport, and then finish processing a variable by clicking the button event inside the widget, and then I need to get the results of the variable after the widget runs to do branching in the actor

This is what I got:

- in the widget:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/b/d9b9ccf2b0a9f7e380ce8d441b16dacae5dcd70b.png)

- in the actor:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/0/dc0c8d31cb0d52442cc2287d71e7dec3236121f4.png)

¯\ \_\_(ツ)\_/¯

The other bits, about actor / widget inheritance, I simply do not understand 😑
