Read (by boxmein) : http://boxmein.x10.mx/tptelements/lua-reference.html#properties.Graphics
Okay, I've figured out how to achieve this in Lua. Turns out it's really simple, it just required a bit of thinking outside the box...
function graphiod(i, colr, colg, colb)
if tpt.get_property("tmp2", i) == 0 then
tpt.set_property("tmp2", math.random(1,5) * 4, i)
end
local colfact = tpt.get_property("tmp2", i)
return 1, 0x00000001, 255, 24+colfact, 20+colfact, 40+colfact, 0, 0, 0, 0
end
TRON's color code is certainly neglected. If you look here, you'll find a bit of info about TRON's color in relation to tmp. That said, perhaps a similar function could be written in lua to generate a random number and convert into a hex color for each particle
ChemGuy:
Okay, I've figured out how to achieve this in Lua. Turns out it's really simple, it just required a bit of thinking outside the box...
function graphiod(i, colr, colg, colb)
if tpt.get_property("tmp2", i) == 0 then
tpt.set_property("tmp2", math.random(1,5) * 4, i)
end
local colfact = tpt.get_property("tmp2", i)
return 1, 0x00000001, 255, 24+colfact, 20+colfact, 40+colfact, 0, 0, 0, 0
end
eh what does this do