Computer Science Canada

row of stars from opposite side of screen

Author:  Tricia [ Sun Nov 14, 2004 11:59 am ]
Post subject:  row of stars from opposite side of screen

hi i need help on how to make the stars go from right to left instead of left to right i made a code but it doesn't seem to work...

code:
    var sides2 := -8
    for decreasing star : 20 .. 1
        drawfillstar (sides2, 170, sides2 + 50, 220, 103)
        delay (100)
        sides2 += 25 * 2
    end for

Author:  skier [ Sun Nov 14, 2004 12:20 pm ]
Post subject: 

fixed
code:

 var sides2 := 600
    for decreasing star : 20 .. 1
        drawfillstar (sides2, 170, sides2 + 50, 220, 103)
        delay (100)
        sides2 := sides2 -25 * 2
    end for

all you hade to do was start your star on the right hand side of the screen and -25*2 to make it move left.post if you have any questions.

Author:  Tricia [ Mon Nov 15, 2004 9:03 pm ]
Post subject: 

skier wrote:
fixed
code:

 var sides2 := 600
    for decreasing star : 20 .. 1
        drawfillstar (sides2, 170, sides2 + 50, 220, 103)
        delay (100)
        sides2 := sides2 -25 * 2
    end for

all you hade to do was start your star on the right hand side of the screen and -25*2 to make it move left.post if you have any questions.


i don't think the code's ryt...coz it still does the same thing Sad

Author:  Tony [ Mon Nov 15, 2004 9:21 pm ]
Post subject: 

Tricia wrote:
i don't think the code's ryt...coz it still does the same thing Sad


have you... actually tried the code? Confused

Author:  Tricia [ Mon Nov 15, 2004 9:29 pm ]
Post subject: 

yes i have

Author:  Neo [ Mon Nov 15, 2004 10:28 pm ]
Post subject: 

Tricia wrote:
yes i have

It should work i just tried it.

Author:  Tricia [ Mon Nov 15, 2004 10:57 pm ]
Post subject: 

my program is pretty messed up ryt now so i guess that's y it's doing lots of weird things... Embarassed Embarassed

Author:  Tricia [ Mon Nov 15, 2004 10:59 pm ]
Post subject: 

can u use an integer for Font.Draw?

Author:  Tony [ Tue Nov 16, 2004 12:06 am ]
Post subject: 

why don't you try and see...

in short, yet

Author:  skier [ Tue Nov 16, 2004 6:49 pm ]
Post subject: 

as far as im conserned the program makes the star go from RIGHT to LEFT and thats what she asked for. so my program works just fine.

Author:  Tricia [ Tue Nov 16, 2004 9:04 pm ]
Post subject: 

okay i did use it and it worked now but i swear it wasn't working when i tried it a few times earlier


: