
-----------------------------------
saahel
Mon Dec 07, 2015 12:29 pm

Need Help with animation (Beginner Coding)
-----------------------------------
Hi, i will just cut to the chase, i would like to know how to make a [/b]square go from right to left of the screen with very simple codes, thank you for your help guys!

this is what i got for now:

var y : int
for decreasing x : 640 .. 0
    y := round (0 / 640 * x + 200)
    drawfillbox (x, y, 42, 220, 1)
    delay (10)
    drawfillbox (x, y, 42, 220, 0)
end for

-----------------------------------
Insectoid
Mon Dec 07, 2015 7:24 pm

RE:Need Help with animation (Beginner Coding)
-----------------------------------
You're almost there. Remember that a box has two sets of x and y coordinates. If you only change one set, the box will stretch instead of move.
