I think this should do it.Zitat:
Zitat von bronxbomber92
What I didnt put is how 'x' changes its value. That, is up to you. :icon_wink
Code:white = Color.new(255, 255, 255)
x = 100
y = 100
function add_to_x()
blah blah
end
function subtract_from_x()
blah blah
end
while true do
screen:clear()
if x <= 0 then
add_to_x() -- [reverse whatever code you have manipulating 'x's value]
end
if x >= 480 then
subtract_from_x() -- [go back to original manipulating code]
end
screen:print(x, y, "Text", white)
