I have a script for chlorine, it distills water. It works fine, except one it forms a layer of distilled water it stops distilling water. Anyone know a script to make distilled water turn water into distilled water? Here is my code:
elements.allocate('MOD', 'CHLR') elements.element(elements.MOD_PT_CHLR, elements.element(elements.DEFAULT_PT_BCOL)) elements.property(elements.MOD_PT_CHLR, 'Name', 'CHLR') elements.property(elements.MOD_PT_CHLR, 'Description', 'Chlorine. Distills water.') elements.property(elements.MOD_PT_CHLR, 'Color', '0x00FFFF') elements.property(elements.MOD_PT_CHLR, 'MenuSection', '7') elements.property(elements.MOD_PT_CHLR, 'Gravity', '1') elements.property(elements.MOD_PT_CHLR, 'Flammable', '0') elements.property(elements.MOD_PT_CHLR, 'Explosive', '0') elements.property(elements.MOD_PT_CHLR, 'Loss', '0') elements.property(elements.MOD_PT_CHLR, 'AirLoss', '1') elements.property(elements.MOD_PT_CHLR, 'AirDrag', '0') elements.property(elements.MOD_PT_CHLR, 'Advection', '1') elements.property(elements.MOD_PT_CHLR, 'Weight', '0') elements.property(elements.MOD_PT_CHLR, 'Diffusion', '1') elements.property(elements.MOD_PT_CHLR, 'Falldown', '2') function element(i,x,y,s,n) type = tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) if type == elements.MOD_PT_CHLR then tpt.parts[i].type = tpt.el.dstw.id end end tpt.element_func(element,tpt.el.watr.id) function element(i,x,y,s,n) type = tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) if type == tpt.el.watr.id then tpt.parts[i].type = tpt.el.dstw.id end end tpt.element_func(element,elements.MOD_PT_CHLR) tpt.element_func(g, tpt.element('CHLR')) local g = function(i, r, g, b) local cola, colr, colg, colb, firea, firer, fireg, fireb cola = 255 -- Alpha colr = 0 -- Red colg = 255 -- Green colb = 255 -- Blue firea = 0 -- Alpha Glow
P.S. Can you put multiple elements in one script?
Yes, you can.
Thank you. How would I find numeracal id for a custom element?
Numeral? You did:
elem.allocate("MOD", "CHLR")
So the id is elem.MOD_PT_CHLR.
Exactly!