Well, I’ve been trying to solve an issue that I’ve had for days. The thing is that I made a simple animation where a text comes up whenever a button is hovered (let’s call this Widget #1), but the button isn’t in the Widget itslef, but in an actor as a 3D Widget (this one will be Widget #2). The main point is that whenever I hover the Mouse over the 3D Widget (Widget #2) the animation on Widget #1 gets activated, something sort like a Call event or something. Do I need an Event Dispatcher? Maybe a Custom Event?
The description is somewhat vague; impossible to answer properly as is. Could you explain who, where and when creates both widgets? Something like:
widget_1 - a regular widget added to the viewport in the player character
widget_2 - a widget component attached to an actor placed in the scene
Desired result: hovering widget_2’s button plays an animation in widget_1.
Once we know where to look for those widgets, we can use the framework to connect them. Or perhaps this revolves around an in-game event of sorts that enables communication; as in - the player approaches an object → a button pops-up and another action triggers once we hover it.
Consider describing the use-case scenario if you think it might be relevant.
Also, is there only 1 instance of those widgets ever or there could be more?
@Everynone I’m facing a somewhat similar issue and maybe you could answer it:
Here’s my setup:
I have several animations on WidgetX. (also buttons …etc)
All WidgetsX have a parent we’ll call it ParentWidget
I have 1 behavior tree to each WidgetX (hence the X in BehaviorTreeX)
there is only one WidgetX active at a time (they are pages, when u switch pages the old page is hidden)
MyPlayerController has a reference to ParentWidget from which I usually get all my references.
Desired Result:
I want to play a specific widget animation from BehaviorTreeX without having to do a lot of manual work and make it idiot proof. (I am currently adding by hand on WidgetX’s event graph each widget animation to an AN_arrayWidgetAnimations “aka. not ideal”) then getting a reference to that array from my player controller.
Here’s my issue:
I have tried to use the same logic I used for getting a reference to all the buttonsWidgets from ParentWidget; but with widget animations it won’t work the same. I cannot get all widgets animations and store them automatically into an AN_arrayWidgetAnimations.
Then, from the behavior tree get a reference to that AN_arrayWidgetAnimations and compare the display name of each animation to a string variable I have edited on my behavior tree.
Which would force me to copy and paste the display name into the string variable, but that is a result I’m okay with.
This system is FAR from ideal, there are many variable for error and at all not idiot proof. I’m trying to develop a tool to share with others, and this is just MEH design to say the least.
I wish I could simply:
Get reference to ParentWidget
Get all Widgets Animations
For each loop
Get display name + equal condition + branch (compare display name to string variable)
Play animation
Or even better: (inside the BehaviorTreeX)
Get reference to ParentWidget
all Widget Animations
get a dropdown menu of each animation available on WidgetX