I was searching through the script manager when suddenly I found a script called Pure Energy. I decided to test it out on some wood and put a few pixels near it. It was too powerful so I put only one pixel. It spawned a PHOT that touched the wood. For some reason, the wood turns blue and its temperature said -nan(ind). What does this mean? How can I fix it?
Replacing " tpt.set_property("temp", math.huge, x, y) " with " tpt.set_property("temp", 100000, x, y) " should fix it, as the problem seems to be the math.huge.
No idea why this happens.
Is there a way to set the temperature to 9725.85C? The code tpt.set_property("temp", 100000, x, y) fixed the glitch but the SING, NEUT, PHOT, and PROT now spawn at normal temperature and the mod is called Pure Energy so is there a way to set the temperature of the things that spawn to higher values? Thanks in advance.
These particles are coded to spawn at normal temperature, but if you still want them to spawn hotter
replace from lines 6 to 12 with
local ri = -1
if math.random(1,3) == 1 then
ri = tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'phot')
elseif math.random(1,3) == 2 then
ri = tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'neut')
elseif math.random(1,3) == 3 then
ri = tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'elec')
end
if ri > -1 then
tpt.set_property("temp", 100000, ri)
end