# Why my branch does not work?

**URL:** <https://forums.unrealengine.com/t/why-my-branch-does-not-work/1287819>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [September 8, 2023, 10:26am UTC](https://forums.unrealengine.com/t/why-my-branch-does-not-work/1287819 "2023-09-08T10:26:24Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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:** [September 8, 2023, 11:58am UTC](https://forums.unrealengine.com/t/why-my-branch-does-not-work/1287819/12 "2023-09-08T11:58:53Z")

</div>

> [@carmanfer](#):
>
> a method that allows me to carry out different logic upon interaction

You’re using inheritance. You have a master item. You’re on the right track. Override the interface function for items that need to behave differently.

> for example pick up weapons, open doors, place things in inventory if they are miscellaneous.

- you have a master item which can dictate default behaviour:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/9/7599555d32d375abc9f54c374a5ba7a843fe0366.png)

- you have a vase that is pickable but breakable; it also can, optionally, respect default behaviour and add its own:

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

- and you have a door that is not pickable, but plays a timeline only it knows about:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/d/a7df5b6f864d77b9b673b53947efe1703ebc05a5.png)

The player just fires the same message at them:

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

The items choose how to respond to it.

* * *

Also, a long post that goes into lots of details:

> [@Why does this gate not work?](https://forums.unrealengine.com/t/why-does-this-gate-not-work/479135/14):
>
> And would I access that from the first person character, or the object? an interface has a bunch of generic functions that do nothing actors with this interface have access to those functions; think new, yet undetermined behaviours & results actors can interpret what each function does to determine the result when the player interacts with an actor, it calls those generic functions of the interface - and it is the actor’s job to do something with that call The player does not need to ident…

---

_[View the full topic](https://forums.unrealengine.com/t/why-my-branch-does-not-work/1287819)._
