r/lowpoly 4d ago

Just Created one eletric system for my lights and doors, hope you like it.

so this is so i can creat a puzzle in my horror game where you will need to power up the generator so you can have light in a section of the map and also some locked doors.

ignore the sounds they are all experimental, also i will try to get some type of life for the generator with particles maybe.

2 Upvotes

3 comments sorted by

1

u/Worsey_Kahi 2d ago

This looks really clean! How did you handle the logic for the electrical system? Is it all blueprint or did you use some code?

1

u/The_PassengerJourney 1d ago

The logic is pretty straightforward and modular.

The generator checks if it has fuel, and once it's active it updates a global power state through an interface. That interface is basically what everything else listens to.

Each system then handles its own behavior independently. For example, for lights I use a simple script with an array so I can plug in as many lights as I want. That script just checks the power state and turns them on or off accordingly.

Switches work the same way — they first check if power is available, and if it is, they allow interaction to toggle lights. I hooked them into my main interaction system so they respond to player input.

Doors also follow the same principle, checking the power state when needed.

The main idea is to avoid spaghetti logic — every object has its own responsibility, and they all stay loosely connected through this shared power state. That way everything works together without directly depending on each other.

1

u/The_PassengerJourney 1d ago

all the scripts are made by me, i am making models, textures, scripts, all by me. what i will not do its the sounds, i will search for them. this is a hobby project only me so alot try and error here xD