I"m posting this since I haven’t found a clear answer on the forums for how to make a Fabricator run on gas or electricity.
I’m not good at writing tutorials but hopefully this will help anyone having problems switching fuel sources. This may not be the best way to switch fuel sources but its working for me. This now works on dedicated servers and in single player.
First you’ll want to take a look at Mezzow’s thread here on how to add to the radial menu.
All of these graphs are on the StorageBox_Fabricator.
To view the example in the editor extract FabricatorTutorial.zip (105 KB) to the folder \Epic Games\ARKDevKit\Projects\ShooterGame\Content\Mods. Change the folder according to where you installed if its different.
I use a variable to set what string is displayed on the radial menu.
The event graph launches the OnRepCondition event when switching fuel sources is called upon, and has the custom event PoweredStructures (multicast and reliable).
I set the string variable’s value according to the condition variable set in the BPTryMultiUse graph.
The OnRepCondition graph.
The PoweredStructuresCheck function.
The FuelCheck function.
The variables used changes how the Fabricator is powered.
UseEntryString sets what will be displayed on the radial menu. It is replicated and multicast to display on clients since it is run server side.
ActiveRequiresPower boolean sets whether or not the Fabricator will require electricity.
The variable ActiveNoFuel trashes the ActiveRequiresFuelItems setting.
The variable NoBurnTime trashes the FuelItemsConsumeInterval setting.
The variable NoFuelGives trashes the FuelItemsConsumedGiveItems setting.
The variable ElectricJunction sets PoweredNearbyStructureTemplate to ElectricJunction
The variable NeedsFuel sets ActiveRequiresFuelItems setting back to Gasoline
The variable BurnTime sets FuelItemsConsumeInterval setting back to 3600
The variable FuelGives sets FuelItemsConsumedGiveItems setting back to none
The variable NoElectricJunction sets PoweredNearbyStructureTemplate to none
The variable Condition is set last after the changes have been made.
The Set is powered prevents the fabricator from remaining powered if it was powered when switching to gas then having shut off the generator and switching back to electricity.
Set Container Active just turns the fabricator off when switching power sources.
To create the variables just drag off the node for the SET functions and promote to variable then set your variables accordingly.