Computer Science Canada

Moving Canadian Flag for school project HELP

Author:  Robotkubo [ Thu Feb 11, 2016 9:26 am ]
Post subject:  Moving Canadian Flag for school project HELP

Hi, In my computer engineering class at school, for a small project, we have to make a Canadian flag move across the screen, I can make the flag, but I really need help with getting it to move. if there are any pros here please help Canada Canada
Here is what I have


setscreen ("graphics:800;600")
var move : int:=1
var move2 : int


loop

move:=move+ 10
%Maple Leaf
%WL %WR %H
drawmapleleaf (100, 25, 275, 200, red)
%Main box
Draw.Box (20, 0, 350, 225, black)

%Box Side Left
Draw.Box (20, 0, 85, 225, black)

%box side right
Draw.Box (350, 0, 290, 225, black)

end loop

Author:  Insectoid [ Thu Feb 11, 2016 1:02 pm ]
Post subject:  RE:Moving Canadian Flag for school project HELP

drawmapleleaf() takes four integers as parameters. If you change those integers, the leaf will be drawn somewhere else. The easiest way to do this is to use variables instead of just numbers. Then change the variable to change where the leaf is drawn.

Author:  Mundane_Ostrich [ Thu Feb 11, 2016 2:31 pm ]
Post subject:  RE:Moving Canadian Flag for school project HELP

Along with Insectoids idea, I would also put a delay in there as well as a cls and a way for the flag to move back.

TIP: You can use move += 10 instead of move := move + 10. It's slightly faster and people don't seem to learn it.
(There's also -=, *= and /=. Pretty helpful stuff)


: