tpt.el.elec.heat=295.15
tpt.el.elec.name="prtn"
tpt.el.elec.color=0xff8080
tpt.el.elec.description="1"
math.randomseed(os.time())
function prtn_update(i, x, y, s, n)
xvel=tpt.get_property("vx",x,y)
yvel=tpt.get_property("vy",x,y)
currtype=tpt.get_property("type",x+xvel,y+yvel)
if currtype>0 and (currtype+1)~=tpt.el.elec.id and currtype~=tpt.el.elec.id and (currtype+1)~=tpt.el.clne.id and currtype~=tpt.el.clne.id and (currtype+1)~=tpt.el.bcln.id and currtype~=tpt.el.bcln.id and (currtype+1)~=tpt.el.dmnd.id and currtype~=tpt.el.dmnd.id and (currtype+1)~=tpt.el.void.id and currtype~=tpt.el.void.id and (currtype+1)~=tpt.el.prti.id and currtype~=tpt.el.prti.id and (currtype+1)~=tpt.el.prto.id and currtype~=tpt.el.prto.id then
tpt.set_property("type",currtype+1,x+xvel,y+yvel)
tpt.delete(i)
elseif currtype>0 and (currtype+1)==tpt.el.elec.id and (currtype+1)==tpt.el.clne.id and (currtype+1)==tpt.el.bcln.id and (currtype+1)==tpt.el.dmnd.id and (currtype+1)==tpt.el.void.idand (currtype+1)==tpt.el.prti.id and (currtype+1)==tpt.el.prto.id then
tpt.set_property("type",currtype+2,x+xvel,y+yvel)
tpt.delete(i)
end
end
tpt.element_func(prtn_update, tpt.el.elec.id,1)
ads999:
@jenn4 (View Post)
So basically what he needs to do is make it so: If Element ID = 158 then change to Element ID 1. Simple
jenn4:
The highest element is FIGH with value of 158. After that is NUM woth value of 159 that is reguired for C code, but it's not an element.