For lack of a better name for it.
<code>msg = "Element Lister is running, to use, just type 'elemlist(start position X, start position Y, start element, stop element)'"
function elemlist(x,y,elemtype,elemstop,separation) -- elemtype being the element it starts on, elemstop being the element it
goes to, separation being the distance between pixels
while elemtype < elemstop do
tpt.create(x,y,elemtype)
if elemtype < 145 or elemtype > 146 then
elemtype = elemtype + 1 -- going to the next element
elseif elemtype > 144 and elemtype < 146 then
elemtype = elemtype + 2 -- skipping element 145, it bugs for some reason
end
x = x + separation
end
end</code>
It just creates every element between elemtype and elemstop (except a few bugs)
Updated version:
<code>
tpt.log("To use the Element Lister, type in console\n'elemlist(start position X,start position Y,stop position X,stop position Y,start element,stop element)'\nIt will draw a line of the elements between the start element and the
stop element going from start X and Y to stop X and Y.")
function elemlist(xstart,ystart,xstop,ystop,elemtype,elemstop)
xincrement = (xstop - xstart) / (elemstop - elemtype)
yincrement = (ystop - ystart) / (elemstop - elemtype)
while elemtype < elemstop + 1 do
tpt.create(xstart,ystart,elemtype)
if elemtype < 145 or elemtype > 146 then
elemtype = elemtype + 1 -- going to the next element
xstart = xstart + xincrement
ystart = ystart + yincrement
elseif elemtype > 144 and elemtype < 146 then
elemtype = elemtype + 2 -- skipping element 145, it bugs for some reason
end
end
end</code>
-- Script starts here
-- by Feynman
-- function elemlist - creates all elements from to
-- x: where to create said element (why stack them?)
-- y: where to create said element (why stack them?)
-- elemtype: starter ID passed to tpt.create, either a string or elements.DEFAULT_...
-- elemstop: ender element ID passed to tpt.create
-- separator: increment step
function elemlist(x,y,elemtype,elemstop,separation)
for i = elemtype, elemstop, separation do
if i == 144 then i += 1 end
tpt.create(x, y, elemtype)
end
end
Wow, thanks! That's rather impressive. (And how do you embed it like that?)
Y U NO EMBED?