Currently I have an actor called rooms with a vector variable storing its location
I also have a actor called gamescontroller this has a variable called RoomLightsOFF which an array of the rooms actor references
I have light switches that when toggled turn on and off the light its connected too and adds or removes the rooms actor to and from the RoomLightsOff array
Finally i have an actor called shadowman i want him to randomly select one of the rooms from the array and teleport to it.
BTW there is always at least one light on in the level
Ive tried a few things already but they always seem to fail at the same place, i do an “is valid” check on the rooms refence the shadow man choses before the teleport and it always comes back false even tho there are valid refences in the array
I actually solved the problem. Basically there are light switches that add the rooms to the lights off array but for whatever reason that was failing to get a valid reference to the room it was in every time.
Ill cant put any screenshots cause im too new of a user apparently but I basically just made a new project and rewrote all the blueprints again and I moved two custom events from the BP_Lights into the game controller. which seemed to fix it