My scripts: http://pastebin.com/uBfpvKgr
Can you explain why this doesn't work?
Let's debug this together:
Did it give you any errors? Those are rather helpful when you are trying to know why your program doesn't work.
> Apparently, it didn't
Okay, then let's see what is executed first when the file is ran.
> "tpt.register_step(blah)"
So that registers the function "blah" to be executed constantly, let's see what that function does
> "dofile("bgEdit.lua")"
The function 'blah' executes our file again, it would be much wiser to create a function to do what we want to do, and then register it or just call it.
So it would give us
function blah()
for x = 50,160 do
for y = 70,180 do
tpt.drawpixel(x,y,math.random(0,255),math.random(0,255),math.random(0,255))
end
end
end
tpt.register_step(blah)
This makes the code much simpler to use and to debug.
Also, you don't explain what exactly doesn't work.
Oh nevermind.
The tpt.register_step(blah) part was missing.
Sorry about that but thanks for the tips in debugging.
--kingcute50 in Powder Toy :D nvm
--roblox username: king2218
--very simple background editing in tpt
function blah()
tpt.drawtext(200,200,"Edited Background!",math.random(0,255),math.random(0,255),math.random(0,255))
for x = 50,160 do
for y = 70,180 do
tpt.drawpixel(x,y,math.random(0,255),math.random(0,255),math.random(0,255))
end
end
end
tpt.register_step(blah)
Just one more question,
What is the length and the width of the screen in tpt?
Thanks for that.
I made something:
function blah() for x = -3,3 do for y = -3,3 do tpt.drawpixel(tpt.mousex + x,tpt.mousey + y,255,255,0) end end end tpt.register_step(blah)
It follows the mouse. XD