Hello!
I'm making a mod in lua and sometimes it NEEDS to change indexes of things and etc. but when something changes, tpt throws only one error(my elements auto-actualize, so it fixes the error).It needs to appear, because the program changes variables during it execution, but there are that ugly messages covering 1/4 of the screen ("autorun.lua:68: <...>"). There is any way to hide the messages (you know, make them not appear in the screen)?
Thanks very much!
*Please, don't note the bad english... I'm not native of an english-speaking country
Hello! Sorry, i've not explained very well... It's an element's update function... But very thanks, anyway!
local rand = elem.allocate("JACOB1", "RAND")
elem.element(rand, elem.element(elem.DEFAULT_PT_LOLZ))
elem.property(rand, "Name", "RAND")
elem.property(rand, "Description", "Every pixel changes into a random element when drawn, fun!")
elem.property(rand, "Color", 0xFFFE8915)
elem.property(rand, "MenuSection", elem.SC_SPECIAL)
elem.property(rand, "Update", function (i)
function ignore(i)
tpt.set_property("type", math.random(1,255), i)
end
pcall(ignore, i)
end)
Thanks very much! Worked perfectly! Thanks! Thanks again!
Okay, here's some stuff I can throw out there.
How do you set the life of your element?
How do you make an element stick to other elements like gel?
How do you make an explosive very powerful but not seem to form a white hole on the entire screen when it explodes?
1.tpt.set_property("life", TheValue ,i)
2.a bit hard tryied it and failed,maybe look at gel in c++ for answers
3.I made some explosives in my fuel mod produce thdr with a mixture of other things to be more powerful
function N2O4(i,x,y,s,n)
ol = math.random(-1,1)
--ol is a 1/3 chance
rocket = tpt.get_property("type",x+math.random(-2,2),y+math.random(-2,2))
--rocket is the type of partical in a 5x5 area with N2O4 being the centre
if rocket == Diazane or rocket == tpt.element('plsm') or rocket == tpt.element('fire') or rocket == tpt.element('thdr') then
--checks if rocket is plsm or fire or diazane(diazane not needed)
if ol == -1 then
-- if ol = -1 (1/3 chance)
sim.partChangeType(i, tpt.element('plsm'))
--make plasma
end
if ol == 0 then
--another 1/3 chance
sim.partChangeType(i, tpt.element('thdr'))
--make thdr for explosiveness
end
if ol == 1 then
sim.partChangeType(i, tpt.element('n2'))
--other product you may choose
end
end
end
tpt.element_func(N2O4,DinitrogenTetroxide)
I have your "More Fuel Mod", and I've learned quite a bit of how TPT script works with it.
I do not have a c++ program. Can it be run from drive E? Is it only about 200 mb's so that downloading/installing it won't destroy my pc? If either of these last two questions are true then...
Where can I find the download for c++?
I meant look at TPT's source stuff thats in C++ (can be found at githud https://github.com/simtr/The-Powder-Toy/blob/master/src/simulation/elements/GEL.cpp ). then use it to base your lua script. you might need some knowledge in how to program in C++/C, I know the VERY basics when using C++, but i am learning
Where can I find the c++ download?