Click icon to toggle night mode.
Contact email: burnydev@gmail.com
Contact website: https://burnydev.com
Contact discord: https://discord.gg/gEc6twx
Welcome and Thanks you.
This document will explain how to use and setup Electric wire.
Press 1 to load your saved game.
Press 2 to save your game.
Press TAB to change mode.
Cancel any action with right click.
To place a component.
Do the same for 1 Generator, 1 Switch On/Off, 2 Wall lamp and lamp. (like in the image above)
You can turn on/off component that have a switch on it by interacting with it (left click on component in aim mode)
When a component generate or receive power, you will see a red light on it.
Blue connector are input and red connector are output.
You can only connect (output <-> input)
To place a wire.
Do the same between switch on/off and first wall lamp then from first wall lamp to the second wall lamp and to the lamp.
To interact with component, left click on it while in aim mode (cursor hidden).
Interact with the generator to activate it. You will see a red light on generator and on the switch on/off.
Interact with the switch on/off. The two ceiling lamp and the lamp will show red light.
Interact with the 2 wall lamp to turn it on.
Hold leftctrl and interact with a connector or a component to remove it.
When removing a component, if there is wire connected, they will be remove in same time.
Remove the generator and place the wind turbine.
Connect the wind turbine to the switch.
Turn off one of the two first lamp and the third lamp will receive power.
To test in editor, in the play options (arrow on the right of button)
To test in a build project.
Client can change the IP in the menu on the right before interact with join switch to connect to host on remote machine.
Network wall: Use to connect or host a server. No need of power or anything else.
Back wire: Default wire use to connect components.
Red wire: Same as black wire except more elastic.
Wall: A simple wall to place components.
Generator: Send 4 energy from his output connector.
Switch on/off: Use to control power distribution.
Wall lamp: When powered and turn on, give light. Lamp consume 1 energy when on. (better fit on wall)
Ceiling lamp: When powered (need a switch on/off to control those lamp), give light. Lamp consume 1 energy when on. (better fit on ceiling)
Junction: Use to connect 2 wire.
Lamp: When powered and turn on, give light. Lamp consume 1 energy when on. (better fit on floor/table)
Battery: Can store energy. Max input 2 energy, max output 2 energy and can store 28 energy.
Switch 3way A: 1 input that can be switched to 2 output.
Switch 3way B: 2 input that can be switched to 1 output.
Relay SPSTNO: Relay control distribution, no power circuit is open, when powered will send energy from input to output.
Relay SPDT: Relay control distribution, no power send energy from input to output 0, when powered will send energy from input to output 1.
Solar panel: Only give energy when receive sun light.
Splitter: Evenly split energy receive from input between 2 outputs.
Water turbine: Generate energy only if underwater.
Wind turbine: Generate energy only if wind present.
Wheel generator: Generate energy when player is running in the wheel.
Merger: Addition all input energy and send it in 1 output.
Presence sensor: Detect player in range, act like a switch.
Pressure plate: Detect player walking on it, act like a switch.
Open electric wire project.
Select Electric wire folder, right click and choose Migrate.
With all selected, click ok.
Send it to the content folder of your project.
ElectricWireGameMode contain the save/load functions and the timer save if dedicated.
If you already use a custom GameMode, use functions LoadElectricStuff and SaveElectricStuff as example.
If you do not use a custom GameMode, add ElectricWireGameMode to the Default GameMode.
Others files use for save are in the folder (ElectricWire/Blueprints/SaveGame).
ElectricWireCharacter contain functionality and the AC_ElectricManager
If you want use the default character from ElectricWire its already setup.
If you already have a character, do follow 5 steps.
1: Add interface BPI_Character to your Character Class Settings.
2: Add BP_ElectricManager to your character Components.
3: Copy/paste the node in EventGraph of ElectricWireCharacter (in the blue comment), to your character EventGraph.
3.1: If you migrate to 3rd persion character project, select CameraBoom and change SocketOffset Y to 150.0.
4: Compile and Save.
5: Add your Character to the Default Pawn Class
Duplicate existing component or create a child blueprint of BP_MasterComponent.
ConnectorInputs and ConnectorOutputs need to be add on Event BeginPlay in the child blueprint Event Graph.
IsOn, IsEnergize and ActualEnergy are networked variables.
Functions OnRep_IsOn, OnRep_IsEnergize and OnRep_ActualEnergy are use to notify client that value have change on server.
Function RemoveComponent will disconnect and remove wire connected to the component and remove the component.
Have 2 interfaces BPIInteraction and BPIEnergy.
The first key is at Time: 0.0 and Value 0.0 (Night begin)
The second key is at Time: 60.0 and Value 180.0 (Night end and Day begin)
The third key is at Time: 180.0 and Value 360.0 (Day end)
Then it loop...
With this setup, night is 60 secs and day is 120 secs.
This give a total of 180 secs for a complete cycle. (The total length of the timeline)
1.4
1.3
1.2
1.1
1.0