Clue: a series of 3 while loops
Im trying to make like a animation.
Pretty much like
Trying to send
A L across the screen
then a U across the screen
then a A across the screen
and have them all meet to form
LUA
What code would I use
Clue: a series of 3 while loops
or a series of if statements
http://one.revver.com/watch/170516
http://one.revver.com/watch/167200
Please click the links above to watch my stick figure animations,
and please, if you have the time, click the ads at the end to earn me some money.
Someday I'll understand a word your saying.
Miniviews:
Spoiler!
Ouch.. that will be one REALLY long script if you did it that way.Originally Posted by MasterChafed
here's the simplest way I can think to do it..
white = Color.new(255,255,255)
-- L starting placement --
lx = 0
-- U starting placement --
uy = 0
-- A starting placement --
ax = 480
-- main loop --
while true do
-- if L's X placement is less then 236, raise untill 236 --
if lx <= 236 then
lx = lx +1 end
-- if U's Y placement is less then 130 raise untill 130 --
if uy <=130 then
uy = uy +1 end
-- if A's X placement is greater then 260, decrese untill 260 --
if ax >= 260 then
ax = ax -1 end
-- print L using the lx placement to assign its X render to use the variable --
screenrint(lx,130,"L",white)
-- U used a Y axis assignment forcing the final track to be from the top of the screen down --
screenrint(240,uy,"U",white)
-- and A came from the left side of the screen, so use A's X placement --
screenrint(ax,130,"A",white
flip.screen()
screen.waitVblankStart()
-- if animation complete. wait 30 frames and break program --
if ax >=260 then
screen.waitVblankStart(30)
break end
-- also you could change from break to
screen:clear()
do file("other program.lua")
afterwards to change to another program after the animation --
end
that would basicly tell the whole thing how to animate to the given positions
P.S. used If statements, and its accualy realy short code![]()
lol, i know, but i eat and breathe if statements. :POriginally Posted by yaustar
http://one.revver.com/watch/170516
http://one.revver.com/watch/167200
Please click the links above to watch my stick figure animations,
and please, if you have the time, click the ads at the end to earn me some money.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks