Detonator help

Hi, I’m trying to do something like a detonator, the point is that I want to make a button to which you can connect the bombs (for example with a component cable) and when you press the button these bombs will activate. Could someone help?

Hi man,
You can create a widget with a button.
when your character get the begin-event, create this widget and add it to the viewport. set also the mouse visible witht the node “set mouse visible”.
For the button , look in the detail and add a on-click-event.
Now for example:
“Get actor of class” , and get the reference to the player character.
from there you can call custom events like, DetonateBomb. (you have to make them first…)

Basically you store the bombs in an array when you spawn them.
You have to make an array of the actor-bomb type, and when you spawn a bomb, you pin the return node ad append it to the array.

In your character , add a custom event DetonateBomb,
add a loop for each- and connect the array of bombs, then for every actor-bomb, call the event-Explode! (or whatever you use to make them boom)
Once done, clear the array.

Thanks. I’m sorry, but I didn’t describe it exactly. I have a detonator actor and I want this detonator to explode those bombs that the player will connect to it after pressing the button (I made linetrace). My main problem is how to make the cable element connect to the detonator and the detonator will blow up only those bombs that are connected to it. It would be best if it would send a custom event that I already have ready

ooooo, ok , well i can think to 3 ways
for make a “cable” that connect the actors
A)you can create a mesh cube, to stretch and place between the actors, but this will make only straight “cables”
B)or you can searc for how make procedural mesh spline , and create a tube out of coordinate , on your own,
C)or you can create a modular pipe sistem to connect them.

i dont know if there are any more ways