I fool around with the Lua console and with Lua scripts in TPT. I also create custom elements using Lua scripts. I thought of an excellent idea yesterday for a Pressure Proof Wifi element, but I don't know how to go about coding it because I kept getting "Unmatched Bracket" while attempting to replicate WIFI's code from 89.0. I want to make Atmoshperic WiFi 1 (AWF1) and Atmospheric Wifi 2 (AWF2) using the Lua console, but I wouldn't know how to code the extra part after the basics.
Any help would greatly be appreciated.
Thanks!
for every particle with type "AWF1" do
if that particle's ctype is the same as this one's
for every particle around that particle
if around-particle is a metal
change its type to SPRK(that metal)
end
end
end
end
But I don't know how to do psuedocode. Sorry, but when I said I knew the basics, I meant:
local atmwifi1 = elements.allocate("OSCE", "AWF1")
elements.element(elements.OSCE_PT_AWF1, elements.element(elements.OSCE_PT_AWF1))
elements.property(elements.OSCE_PT_AWF1, "Name", "UQRK")
elements.property(elements.OSCE_PT_AWF1, "Description", "AWF1. Atmospheric WiFi One. Wifi Designed for use in Pressurized Invironments.")
elements.property(elements.OSCE_PT_AWF1, "Colour", 0x000000) <- I'm going to make it Light Blue
elements.property(elements.OSCE_PT_AWF1, "MenuVisible", 1)
elements.property(elements.OSCE_PT_AWF1, "MenuSection", SC_ELEC)
elements.property(elements.OSCE_PT_AWF1, "Advection" 0.0)
elements.property(elements.OSCE_PT_AWF1, "AirDrag", 0.0)
elements.property(elements.OSCE_PT_AWF1, "AirLoss", 0.00)
elements.property(elements.OSCE_PT_AWF1, "Loss", 0.0)
elements.property(elements.OSCE_PT_AWF1, "Collision", 1)
elements.property(elements.OSCE_PT_AWF1, "HeatConduct", 1)
elements.property(elements.OSCE_PT_AWF1, "Gravity", 0)
elements.property(elements.OSCE_PT_AWF1, "Diffusion", 0)
elements.property(elements.OSCE_PT_AWF1, "HotAir", 0.0)
elements.property(elements.OSCE_PT_AWF1, "Falldown", 0.0)
elements.property(elements.OSCE_PT_AWF1, "Flammable", 0)
elements.property(elements.OSCE_PT_AWF1, "Explosive", 0)
elements.property(elements.OSCE_PT_AWF1, "Meltable", 0)
elements.property(elements.OSCE_PT_AWF1, "Hardness", 100)
elements.property(elements.OSCE_PT_AWF1, "Weight", 0)
elements.property(elements.OSCE_PT_AWF1, "Temperature", 273.15)
elements.property(elements.OSCE_PT_AWF1, "HeatConduct", 0)
elements.property(elements.OSCE_PT_AWF1, "State", ST_SOLID)
elements.property(elements.OSCE_PT_AWF1, "Properties", elem.TYPE_SOLID)
elements.property(elements.OSCE_PT_AWF1, "LowPressure", IPL)
elements.property(elements.OSCE_PT_AWF1, "LowPressureTransition", NT)
elements.property(elements.OSCE_PT_AWF1, "HighPressure", IPH)
elements.property(elements.OSCE_PT_AWF1, "HighPressureTransition", NT)
elements.property(elements.OSCE_PT_AWF1, "LowTemperature", ITL)
elements.property(elements.OSCE_PT_AWF1, "LowTemperatureTransition", NT)
elements.property(elements.OSCE_PT_AWF1, "HighTemperature", ITH)
elements.property(elements.OSCE_PT_AWF1, "HighTemperatureTransition", NT)
(WHERE COMPLEX CODE WILL GO FOR AWF1) <-- I don't know how to code this section in "Simple Terms" like the above.
I only know how to do this much, and I know from looking at the code that the above won't be enough to create my own wifi. I probably got off to a bad start by now specifically asking what exactly I needed help coding. A Step-by-step explanation would be perfect if possible! :D