local values = { } -- Make a new table for safe keeping
values["Name"] = "AWES"
values["Description"] = "This is a demo element for a TPT thread."
-- For the "keys" inside the square brackets, use any of those below but with a capital letter to start off.
elements.element(elements.DEFAULT_PT_WATR, values)
-- This is the magic command that will set all those values at once.
-- Or, you could do it the Good Guy Greg way, and create your own entire element for this!
elements.allocate("boxmein", "AWES")
-- This creates a new key for your element and adds it in your namespace, so "boxmein" AWES and "FinalFlash50" AWES can be different.
elements.element(elements.BOXMEIN_PT_AWES, elements.element(elements.DEFAULT_PT_VIBR) )
-- This uses my newly generated key! ^ , also it copies all VIBR properties inside AWES.
-- I guess the rest could be done exactly like above, but instead of elements.DEFAULT_PT_WATR use elements.BOXMEIN_PT_AWES
Many thanks, mein of the box *does the chinese bow thing while someone hits gong in background*
boxmein:
@ThunderSt (View Post)
All those are tpt.setXYZ. Those aren't tpt.el.XYZ.
Quickly made list (from src/luaconsole.c @ lines 462 .. 572):
tpt.el.inst.
"name" "color" "advection" "airdrag" "airloss" "loss" "collision" "gravity" "diffusion" "hotair" "falldown" "flammable" "explosive" "meltable" "hardness" "menu" "enabled" "weight" "menusection" "heat" "hconduct" "state" "properties" "description"
Guess their values yourself >:]
Set them with
tpt.el.inst.gravity = 0
Get them with
gr = tpt.el.inst.gravity
AWSOMESAWCE! Time to reprogram an element!!! (temporarily)
Edit: 'name' makes the element have no name, and 'color' makes the name have the life with soap ctype color, and black in the element selection.
tpt.el.watr.name = 'awsm'
IT WORKS! Thank you box!
Edit: Coding water into 'AWSM', and changing properties.. I would like to have the possibility of binding multiple commands into a single one, so I could use that one and change an element into a brand new element via console without writting a lot of commands.
Edit2: How do I make Watr stop turning into Wtrv because of heat?
Edit3: Awesome Sauce, AKA: AWSM..
Yep, modified water.
Paused,
2 frames after,
4 frames after,
12 frames after,
after the explosion ended.