hello to all, i wanted to do some kind of wire or connections that the user can layout and build.
but i have no idea on what or how the logic on this is.
basically, the player has this box actor, let’s say this is a generator that generates electricity.
then another box actor that requires electricity.
the player can layout the wires to connect them both.
note: the game is in topdown grid style
so to connect both items, the player must place a few conduits that connect to each other.
now the question is, how can i let the game or have a blueprint logic that lets it know if it has an ‘working’ electric connection
my current one is just a blueprint actor that checks above, below , left and right of the conduit of there’s another conduit.
then stores it in a variable, then when an object checks for electric supply, it asks the connected conduit to ask the next conduit if it is connected to the main power supply… looping all conduits.
but this works on a direct connection… having a hard time to make it work on a split connection…
any other idea how to proceed? or better ideas?
another idea i have got is, a conduit has a special nav modifier, that a special invisible unit can only traverse, this way, for a electricity connection check, all i have to do is spawn the invisible actor, with high speed, then navcheck if it can reach any actor that produces electricity… using pathfinding…
still, im looking for better and faster ways… just like any other building games…
like prison architect, or rimworld, or simcity or cities skylines…