Satisfactory

Satisfactory

View Stats:
Ficsit Network Examples
Hiya,
Anyone have any basic Lua example code a button changing the colour of a light?
The examples in the mod are a bit extreme for a beginner!
Many Thanks :)
< >
Showing 1-2 of 2 comments
zenomat Oct 23, 2021 @ 11:58am 
I assume that by light you mean the "Indicator pole". To run the code you need a computer with a CPU, memory and EEPROM and an indicator pole connected to the computer.

Lua code:

pole1 = component.proxy("A5360FC24A1727A8CD5905BCA9FB847F")
pole1:setColor(1, 0, 0, 1)

while true do
pole1:setColor(1, 0, 0, 1)
event.pull(0.5)

pole1:setColor(0, 1, 0, 1)
event.pull(0.5)

pole1:setColor(0, 0, 1, 1)
event.pull(0.5)
end

This code will change the color every 0.5 seconds.
Replace "A5360FC24A1727A8CD5905BCA9FB847F" with the address of your pole. You get the code by using the "network manager" - click on the pole, copy paste the address. It's that long string on the top of the dialog.
Rhubarb Bikini Oct 23, 2021 @ 3:05pm 
Thank you! That is very helpful.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Aug 2, 2021 @ 4:06am
Posts: 2