Got 2 really weird bugs going on but I’ll start with the primary bug that will likely resolve the other:
- I am working on creating functionality similar to the game Factorio. I have working blueprints and am working on the inserters, which is a lot more complex and annoying than I thought it’d be… My primary method of getting data to determine if an object needs to move is by casting to any suitable blueprint that is before it (ie a conveyor belt, machine, storage, etc) and this has let me get the variables from the previous one and set them to the next one in line, and then reset the previous so it can accept new objects.
Particularly I am encountering an error when a Machine is before the Inserter. The Inserter works when it’s a Conveyor Belt before it. But with the Machine, when I try to pass Object (a Actor Reference Variable set to the Item spawned) it does not pass it, instead nothing is passed. This breaks the code and logic entirely because if I look at Machine, it has a valid Object set to the Item it spawned. Yet for some reason when I try to access this in the Inserter BP and set Object to it, I doesn’t return the reference. I have triple checked the variable Object, it is indeed an Actor Object Reference and all of the other aspects of my BP’s work. I am completely baffled on what could be causing this. Below are the relevant blueprints:
BP_Machine_01
BP_Inserter_01 (after logic determining BP_Machine_01 is Before)
BP_Inserter_01 (rotation commands for the arm and moving the Item with it)
Here is where it fails, when it tries to grab Object, there is nothing in it.
As you can see, the game sets the newly made Item as Object in Machine, the Inserter recognizes Machine as the Before and yet it fails to set Machine-Object to Inserter-Object.
- Most likely a side-effect from 1), but if I only compile BP_Machine_01, then the Inserter no longer recognizes it as Before. But if I compile BP_Inserter_01 it re-recognizes it as Before.
What is going on here? This is seemingly defying the very Blueprint logic. Is there an issue with the SpawnActor node? Or perhaps an issue with setting Actor Object References across Blueprints instances?