How To make a Power Generator For My game In UE5.

So I have made a Generator actor, and its Purpose Is to Check The Bool whether The actor Connected To It is Powered or Not This is a screen shot of How I Have set Up this actor.


This Is How I have Implemented This Interface and Checked the bool “Powered”


I Have Set The Fuel variable. sets the “Powered”.


the Arrey is Used to create the List of actors That Implement The Interface

Now The Issue Is Arriving that, This is not affecting all the selected actors

As You can See, The Fuel is set To 100, so all the selected lights are working.

But here, Only Two Lights are Switching out of selected lights, when Fuel Gets Below Zero

So any idea why this is happening and What I can Do about it

Can you see if it is just this particular light? Is it the specific index that is causing the issue, or is it the light? :slight_smile:

I believe that is the Index That calling The issue, as all lights are of the same blueprint actor, the lights Code Is pretty simple so no chance of going wrong in there

2 things I am noticing:

  1. In your foreach loop you are connecting to the break pin. Why is that? Doesn’t make sense in this context.
  2. No need to check for “Does implement interface” as the “Set Power” message does nothing if the object doesn’t implement the interface.