Download

Using "Retriggerable Delay" in a UMG widget blueprint

I’m trying to get my character to attack from a button interface rather than keyboard/mouse input.

I used a custom widget and added a button to it. There is an event for when that button is pressed.

I already have attack working from keyboard input so I just copied that over to the “OnPressed” event for the button.

Of course, it’s not entirely that simple; the button needs an instance of the character so I used “Get All Actors of Class” and a “ForEachLoop” to get an instance of my character. From that point forward it was the same process as shown below.

Left screen is the Character blueprint, Right screen is the Widget blueprint
http://s13.postimg.org/oqhawi4eb/Untitled.jpg

The problem here is that the stuff after “Retriggerable Delay” is not being called. If I remove “Retriggerable Delay”, it all works fine. I also know this because I get this error message:

Error Accessed None ‘CallFunc_Array_Get_Item’ from node Set Pressed attack in graph ‘EventGraph’ in blueprint MenuWidgetBlueprint

Error Accessed None ‘CallFunc_Array_Get_Item’ from node Set Free to animate in graph ‘EventGraph’ in blueprint MenuWidgetBlueprint

So what I want to know is, why is this happening? Can I not use “Retriggerable Delay” in this way?

Figured it out, after I used “Retriggerable Delay” I had to get another instance of my character.