RAND create random element.
local RAND = elements.allocate("MOD", "RAND")
elements.element(elements.MOD_PT_RAND, elements.element(elements.DEFAULT_PT_DMND))
elements.property(elements.MOD_PT_RAND, "Name", "RAND")
elements.property(elements.MOD_PT_RAND, "Description", "Random element")
elements.property(elements.MOD_PT_RAND, "Colour", 0x00744484)
elements.property(elements.MOD_PT_RAND, "MenuSection", 11)
local function rand(i)
local w=math.random(1,176)
tpt.parts[i].type=w
end
tpt.element_func(rand,RAND)
CeeJayBee:
Maybe you could make some types of rand? Like PRAN (powders) SRAN (solids) or GRAN (lol, gases). You'd have to isolate the numbers of the powders 'n' shizzle like that.
you mean this?
https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=18279
I actually meant ones that spawn random powders or solids or gases, not an element with random properties xD
I just did that. I used there powder toy ID's and put them into a table :P
Nice. its quite addicting :P