What is this?
Posted: Tue Feb 07, 2017 4:17 pm
So, I have a code which will make the background seem more alive, but, I cant get to using it because of the error
"unexpected symbol near '='"
Here is the code:
"unexpected symbol near '='"
Here is the code:
Code: Select all
move = Layer.get("BGOM")
function onLoop()
if Layer.speedY(move) < 1 then
Layer.speedY(move) = -1
end
if Layer.speedY(move) > 1 then
Layer.speedY(move) = move:Layer.speedY / 2
end
if Layer.speedY(move) < 0 then
Layer.speedY(move) = move:Layer.speedY * 2
end
if Layer.speedY(move) < -5 then
Layer.speedY(move) = 5
end
end