I'm not in danger or anything because of the title so mods dont ban this for being in a unrelated category, however, I am trying to make a TPT mod (CATSSMAC's mod) and i'm attempting to make an element called "MEOW" and when adding the lua script, it should work, but is not working :( i cant see the element anywhere and is nil (void) can anyone help me. here is the script if you need it to help this work. I only know Lua and not C++ so this is in Lua, along with my entire mod.
local elemID = elements.allocate("CATSMACMOD", "MEOW")
local elem = elements.element(elemID)
elem.Name = "MEOW"
elem.Description = "CATSSMAC mod element. Really doesn't do anything but explode into PROT, ELEC, and NEUT when heated over 1000."
elem.Colour = 0x00B2FF
elem.MenuSection = elements.SC_SOLIDS
elem.Properties = elem.TYPE_SOLID
elem.Temperature = 22
elem.HeatConduct = 100
function elem.Update(i, x, y, s, nt)
local part = tpt.parts[i]
if part.temp > 1000 then
part.type = elements.PROT
local right = tpt.get_particle_at(x + 1, y)
if right then
right.type = elements.ELEC
else
tpt.create(x + 1, y, elements.ELEC, 0, 0)
end
local left = tpt.get_particle_at(x - 1, y)
if left then
left.type = elements.NEUT
else
tpt.create(x - 1, y, elements.NEUT, 0, 0)
end
end
return 0
end
elem.elementand
elem.property.
sim.partIDor
sim.partProperty
ok ,well the script is ai but the concept like name and description were by myself. I'll check the wiki, thanks :) I also have made some scripts before by myself but they are unrelated to TPT