
-----------------------------------
dani190
Tue Dec 13, 2005 9:43 pm

doing house project need help asap
-----------------------------------
hey guys i need to know how to do the following:
make an oval(sun/moon) move across the screen
make smoke that comes out of a chimny

-----------------------------------
Geminias
Tue Dec 13, 2005 9:55 pm


-----------------------------------
To move oval across the screen:


setscreen ("graphics:max,max,offscreenonly")

for i : 1 .. maxx
  drawfilloval (i, 100 , 50 , 50, 13)
  View.Update
  delay (15)
  cls
end for 

[/code]

-----------------------------------
dani190
Tue Dec 13, 2005 9:56 pm


-----------------------------------
omg thx now i just need smoke

-----------------------------------
Geminias
Tue Dec 13, 2005 9:59 pm


-----------------------------------
smoke is pretty easy too, but you have to know how to import pictures.  What you do is you get two pictures of billowing smoke, or just use the spray can in paint.  

then you take the pictures making sure they each have different particle patterns and you import them into your program.  And make them show up, one after the other in a continous loop, so it will appear to be billowing smoke lol.  

if you can't import pictures either view the tutorial section, or ask me i'll give you a list of the functions you'll need, but i wont code it all for you.

-----------------------------------
dani190
Tue Dec 13, 2005 10:01 pm


-----------------------------------
var row, column : int
var x : int
x := 1
loop
    setscreen ("graphics:max,max")
    colorback (black)
    setscreen ("graphics:max,max,offscreenonly")

    for i : 1 .. maxx
        drawfilloval (i, 300, 40, 40, white)
        
        delay (10)
        cls



        %---------------------------------------------------Stars begin


        delay (200)
        randint (row, 1, 20)
        randint (column, 1, 158)
        locate (row, column)
        color (white)
        put "*"
        %----------------------------------------------------Stars end


        %              x1  y1  x2   y2    color
        Draw.FillBox (150, 50, 400, 250, brightred) %Main house box
        Draw.FillBox (501, 50, 620, 150, brightgreen) %Garage
        Draw.FillBox (520, 50, 601, 140, brightblue) %Garage Door
        Draw.FillBox (350, 140, 300, 170, yellow) %Main house window Right side
        Draw.FillBox (200, 140, 250, 170, yellow) %Main house window Left side


    end for


end loop
 
THAT IS WHAT i have now but i cant get the moon to go over the house can u guys look and see if u can get the moon to go over  like a real moon

-----------------------------------
Geminias
Tue Dec 13, 2005 10:24 pm


-----------------------------------
wow man.. you always declare your setscreen function first, and you only need one.  If you use the "offscreenonly" option it will make all the adjustments off screen and you can only see the new version if you use the View.Update command.  So if you run that code, you will see nothing.   

The advantage of "offscreenonly" is it makes objects move smoothly across the screen rather than having them flicker like pure "cls"ing would do.  

Read the tutorials and get a better feel for the turing language before you start asking all kinds of questions.  And also, ask questions in the "Turing help" section, not here.

-----------------------------------
dani190
Tue Dec 13, 2005 10:27 pm


-----------------------------------
ok then how can i make my moon arc across the screen then?

-----------------------------------
dani190
Tue Dec 13, 2005 10:34 pm


-----------------------------------
also View.Update will not work i get an error called update is not in the export list of view

-----------------------------------
zylum
Tue Dec 13, 2005 10:58 pm


-----------------------------------
wtf? why is this in tutorials? should be in turing help... too bad i cant move threads  :cry:

-----------------------------------
dani190
Wed Dec 14, 2005 7:58 am


-----------------------------------
cant you just help i cant move it either but i really need help man :( plz help guys

-----------------------------------
dani190
Wed Dec 14, 2005 1:17 pm


-----------------------------------
help plz

-----------------------------------
codemage
Wed Dec 14, 2005 2:07 pm


-----------------------------------
make sure you have View.Update capitalized as shown here.

Arcing is probably beyond your ability.

Work on getting the chimney to go.  You can probably make a few grey circles clumped together to simulate smoke.  Then use the same technique you used to move the moon across.

Here is your code with some of your errors removed, and View.Update in the right spot.  Try to fix it from here.


setscreen ("graphics:max,max,offscreenonly")

var row, column : int
var x : int := 1

colorback (black)

loop
    for i : 1 .. maxx

        cls
        drawfilloval (i, 300, 40, 40, white)

        %---------------------------------------------------Stars begin

        delay (200)
        randint (row, 1, 20)
        randint (column, 1, maxcol)
        locate (row, column)
        color (white)
        put "*"
        %----------------------------------------------------Stars end

        % x1 y1 x2 y2 color
        Draw.FillBox (150, 50, 400, 250, brightred) %Main house box
        Draw.FillBox (501, 50, 620, 150, brightgreen) %Garage
        Draw.FillBox (520, 50, 601, 140, brightblue) %Garage Door
        Draw.FillBox (350, 140, 300, 170, yellow) %Main house window Right side
        Draw.FillBox (200, 140, 250, 170, yellow) %Main house window Left side
        View.Update
        delay (5)

    end for


end loop


-----------------------------------
dani190
Wed Dec 14, 2005 2:14 pm


-----------------------------------
ok man thx, but now my stars are going crazy and my moon is going way way to slow, iv been trying to fidle with it but it wont work, il continue trying but could u help me with the speed of the stars and the moon!

-----------------------------------
dani190
Wed Dec 14, 2005 4:35 pm


-----------------------------------
nvm i got it guys thx for all the help but now i need help with the smoke who can help me (not provide coding)

-----------------------------------
alvini
Wed Dec 14, 2005 7:43 pm

need help for a project asap!!
-----------------------------------
hey guys i just need how to make smoke and meke the stars .

-----------------------------------
alvini
Wed Dec 14, 2005 7:51 pm

Re: need help for a project asap!!
-----------------------------------
hey guys i just need how to make smoke and make the stars .

-----------------------------------
Albrecd
Thu Dec 15, 2005 2:50 pm


-----------------------------------
In order to make the smoke, you need 2 pictures of it, like Geminias said.  You need to have two pictures of the smoke, different pictures but similar, for example:

_***_  __  *****
*****  __  _***_
_***_  __  *****
*****  __  _***_
_***_  __  *****
*****  __  _***_
_***_  __  *****
*****  __  _***_

(preferrably these pictures would not be made from text)

When these pictures are interchanged, it should look like the puffs of smoke are rising.

In order to do this:

var counter := 1

Pic1 := Pic.FileNew ("filename.bmp")
Pic2 := Pic.FileNew ("filename2.bmp")

loop
counter := (counter + 1) mod 2
if counter = 1 then
    Pic.Draw (Pic1, x, y, picMerge)
else
    Pic.Draw (Pic2, x, y, picMerge)
end if
end loop


-----------------------------------
Cervantes
Thu Dec 15, 2005 5:21 pm

Re: need help for a project asap!!
-----------------------------------
hey guys i just need how to make smoke and make the stars .
help plz
can anybody help me how to make smoke.
plz 
help?
Kids, relax.  There's no need to bump your thread after waiting such short times.  It only pisses people off.   :x 

You two probably go to the same school.  Why are you both asking the same questions to us, when you should first be asking each other?

Lastly, you've got to put some effort into it yourself.  You can't just say, "please help me" and expect us to do it for you, for four reasons.  First, that's extremely rude.  Second, we have no obligation to help; we do this voluntarily.  Third, that's cheating.  Fourth, and most important, you don't learn from it.

-----------------------------------
dani190
Thu Dec 15, 2005 7:13 pm


-----------------------------------
well im just saying something her also you have no clue how much we have done,we have the whole project almost done we r just asking for help with 2 things, also yes we do go to the same school but that doesnt mean we live together and know when 1 of us is guna post that so you cant expect that

-----------------------------------
dani190
Thu Dec 15, 2005 7:14 pm


-----------------------------------
from last post ALSO 
we have asked each other but if we give each other code then we get a 0 so i guess u see why we arent doing that

-----------------------------------
codemage
Fri Dec 16, 2005 10:50 am


-----------------------------------
If we give you code, then your assignment is logically worth zero as well, by the same ethical standard.

You've had all sorts of suggestions on how to solve your problem.  No self-respecting person here is going to write the code for you.

Try something - and someone will show you where your errors are if your solution doesn't work.

-----------------------------------
dani190
Fri Dec 16, 2005 2:34 pm


-----------------------------------
i am not freaken asking for you to write the code gosh
im asking for help WITH it

-----------------------------------
Albrecd
Fri Dec 16, 2005 4:08 pm


-----------------------------------
But if you don't post any code, then It's more like you helping us do your code.  (And sence you don't know how [no offence intended, but if you did you probably wouldn't be asking for help] you wouldn't really be helping us)

-----------------------------------
dani190
Sat Dec 17, 2005 7:21 pm


-----------------------------------

setscreen ("graphics:max,max,offscreenonly")



colorback (blue)
cls





var v : int
var u : int
var c : int
var count : int
var g : int
var k : int
var countx, county : int

var a, b : int
var x2, y2 : int
var x, y : int
a := 420
b := 50
c := blue
countx := 10
county := 7
x := 1300
y := 600
var h : array 1 .. 4 of int := init (150, 400, 270, 20)    %Roof
var d : array 1 .. 4 of int := init (250, 250, 400, 20)     %Roof



loop



    g := 1300
    k := 400

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    a := a
    b := b + 5

    exit when b > 130
    View.Update
    delay (150)

    cls
    colorback (c)
    drawfilloval (g, k, 20, 20, yellow)





end loop

loop

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house

    View.Update
    delay (50) %Controls how fast the sun moves!
    colorback (c)

    cls


    drawfilloval (x, y, 20, 20, yellow)
    exit when x = 0
    x := x - countx
    y := y - county
    if y > 500 then
        county := 0
        if x < 300 then
            county := +10




        end if
    end if


end loop

x := 2
y := 300
countx := 10
county := 7


loop


    View.Set ("offscreenonly")
    
    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house

    a := a
    b := b - c
    c := 0
    if b = 100 then
        c := 0
    end if


    View.Update

    delay (50)   %Controls how fast the moon moves!

    colorback (black)
    
    cls
    
    drawfilloval (x, y, 20, 20, white)

    exit when x > 1500
    x := x + countx
    y := y + county
    if y > 500 then
        county := 0
        if x > 750 then
            county := -7
        end if
    end if
end loop

hey guys, i need the garage to close again,
and smoke to come out of the chiminy

-----------------------------------
pavol
Sat Dec 17, 2005 7:47 pm


-----------------------------------
well, how did you open the garage door? use the same technique to close it. slowly draw a blue box and increase its size. also, a tip: use for loops, makes moving objects easier

-----------------------------------
dani190
Sat Dec 17, 2005 8:31 pm


-----------------------------------
thanks so much garage works now, but i still need the smoke, anybody know how to?

-----------------------------------
pavol
Sat Dec 17, 2005 8:50 pm


-----------------------------------
draw a picture of the smoke like others were suggesting and then use the same technique you've been using so far to move the moon and sun to move the smoke up.

-----------------------------------
dani190
Sat Dec 17, 2005 10:50 pm


-----------------------------------
ok does anybody think they could help me some more wit this smoke, maybe provide some coding cause i cant get it to work

-----------------------------------
pavol
Sun Dec 18, 2005 12:37 pm


-----------------------------------
post what you've got so far

-----------------------------------
dani190
Sun Dec 18, 2005 2:18 pm


-----------------------------------

setscreen ("graphics:max,max,offscreenonly")




colorback (blue)
cls





var c : int
var y1 : int
var x1 : int
var countx, county : int
var row : int
var column : int
var a, b : int
var x2, y2 : int
var x, y : int
a := 420
b := 50
c := blue
countx := 10
county := 7
x := 1300
y := 600
x1 := 1300
y1 := 400
var h : array 1 .. 4 of int := init (150, 400, 270, 20)    %Roof
var d : array 1 .. 4 of int := init (250, 250, 400, 20)     %Roof



loop




    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house

    a := a
    b := b + 5


    exit when b > 130
    View.Update


    delay (150)

    cls
    colorback (c)
    drawfilloval (x1, y1, 20, 20, yellow)





end loop

loop

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house

    View.Update
    delay (50) %Controls how fast the sun moves!


    colorback (c)


    cls


    drawfilloval (x, y, 20, 20, yellow)


    exit when x = 0
    x := x - countx
    y := y - county
    if y > 500 then
        county := 0
        if x < 300 then
            county := +10

            a := a
            b := b - 8

            exit when b > 130


        end if

    end if


end loop


x := 2
y := 300
countx := 10
county := 7


loop


    View.Set ("graphics:max,max,offscreenonly")

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house

    a := a
    b := b - c
    c := 0
    if b = 100 then
        c := 0
    end if



    View.Update

    delay (50)     %Controls how fast the moon moves!

    colorback (black)


    cls


    drawfilloval (x, y, 20, 20, white)


    exit when x > 1500
    x := x + countx
    y := y + county
    if y > 500 then
        county := 0
        if x > 750 then
            county := -7
        end if
    end if



    delay (100)
    randint (row, 1, 20)
    randint (column, 1, 80)
    locate (row, column)
    color (white)
    put "*"

end loop

ok so thats what i have so far and i want the smoke to show up during the night time, also i cant really get my stars to work, i dont want 1 star to show up i want like tuns at a time and they just go away and eventually come back (blinking stars)
Thanks

-----------------------------------
pavol
Sun Dec 18, 2005 4:02 pm


-----------------------------------
you should really learn how to use for loops. THEY WILL HELP YOU. anyways, for the smoke, it all depends on how you want to draw it. if you use paint then save the file bring it into your program and just move it up  the same way you moved your sun and moon. for the stars, depending on how many stars you want you can declare an array storing the star's x and y coordinates and then use a for loop to draw them inside your main loop. to make them flash just make 2 for loops one drawing them in white and another drawing them in black

-----------------------------------
dani190
Sun Dec 18, 2005 6:05 pm


-----------------------------------

setscreen ("graphics:max,max,offscreenonly")




colorback (blue)
cls





var c : int
var y1 : int
var x1 : int
var countx, county : int
var row : int
var column : int
var a, b : int
var x2, y2 : int
var x, y : int
var Pic1:int
var Pic2:int
a := 420
b := 50
c := blue
countx := 10
county := 7
x := 1300
y := 600
x1 := 1300
y1 := 400
var h : array 1 .. 4 of int := init (150, 400, 270, 20)    %Roof
var d : array 1 .. 4 of int := init (250, 250, 400, 20)     %Roof



loop




    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)   %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)   %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)   %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)   %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)   %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)   %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)   %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)   %Rail of left window (left side)



    a := a
    b := b + 5


    exit when b > 130
    View.Update


    delay (150)

    cls
    colorback (c)
    drawfilloval (x1, y1, 20, 20, yellow)





end loop

loop

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, yellow)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, yellow)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)       %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)   %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)   %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)   %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)   %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)   %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)   %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)   %Rail of left window (left side)

    View.Update
    delay (50) %Controls how fast the sun moves!


    colorback (blue)


    cls


    drawfilloval (x, y, 20, 20, yellow)


    exit when x = 0
    x := x - countx
    y := y - county
    if y > 500 then
        county := 0
        if x < 300 then
            county := +10

            a := a
            b := b - 8

            exit when b > 130


        end if

    end if


end loop





x := 2
y := 300
countx := 10
county := 7


loop



    View.Set ("graphics:max,max,offscreenonly")

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)     %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)     %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)       %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)     %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)     %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)     %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)     %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)     %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)     %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)     %Rail of left window (left side)


    a := a
    b := b - c
    c := 0
    if b = 100 then
        c := 0
    end if




    View.Update


    delay (50)     %Controls how fast the moon moves!


    colorback (black)
    var counter := 1

    Pic1 := Pic.FileNew ("filename.bmp")
    Pic2 := Pic.FileNew ("filename2.bmp")

    loop
        counter := (counter + 1) mod 2
        if counter = 1 then
            Pic.Draw (Pic1, 200, 400, picMerge)
        else
            Pic.Draw (Pic2, 100, 350, picMerge)
        end if
    end loop


    cls

    delay (100)
    randint (row, 1, 20)
    randint (column, 1, 158)
    locate (row, column)
    color (white)
    put "*"




    drawfilloval (x, y, 20, 20, white)


    exit when x > 1500
    x := x + countx
    y := y + county
    if y > 500 then
        county := 0
        if x > 750 then
            county := -7
        end if
    end if






end loop

ok so thats my code and im trying to get the smoke to work, it just says that there is not value or something like that!
Help plz

-----------------------------------
pavol
Sun Dec 18, 2005 6:20 pm


-----------------------------------
make sure that the picture file name is correct and make sure that it's in the same folder as your turing progra. also you might want to exit that loop somehow because it's infinite

-----------------------------------
Albrecd
Sun Dec 18, 2005 7:21 pm


-----------------------------------
For the smoke, you could draw a grey circle (or more than one) and have it (them) rise to the top of the screen.  If you want the smoke to keep coming then when the circle reaches the top of the screen you could make it restart at the chimney.

Ex:

YOval := whatever the height of the chimney is

loop   %just put it in the main loop
Draw.FillOval (Chimney_PositionX, YOval, 10, 10, grey)

YOval += 3   %or whatever

if YOval > maxy then     % If the circle is above the top of the screen
    YOval := whatever the height of the chimney is     %Restarts the circle at the chimney
end if
end loop

-----------------------------------
dani190
Sun Dec 18, 2005 8:14 pm


-----------------------------------
umm that dont work it only draws one circle

-----------------------------------
dani190
Sun Dec 18, 2005 8:58 pm


-----------------------------------
anyone else know how to do the smoke in a different way?

-----------------------------------
Albrecd
Sun Dec 18, 2005 9:17 pm


-----------------------------------
So add more circles, all you need is a Y vairable for each, the loop needs to add 3 or whatever to the Y variables, and you need a separate if statement for when each circle gets to the top of the screen.

-----------------------------------
dani190
Sun Dec 18, 2005 9:35 pm


-----------------------------------
lol uv confused me , how do i add more and get em moving

-----------------------------------
Albrecd
Mon Dec 19, 2005 8:45 am


-----------------------------------
Well since I've used only 1 Draw.FillOval, maybe draw 2 or 3 in YOUR code.  And like I said, they each need their own Y variable and if statement.

-----------------------------------
dani190
Mon Dec 19, 2005 4:18 pm


-----------------------------------
ok but if i do that will it make it move like smoke?

-----------------------------------
Albrecd
Mon Dec 19, 2005 6:13 pm


-----------------------------------
What I'm saying is, if you draw grey circles that move upward from the chimney to the top of the screen, you can give the appearance of smoke: if you space them appart, it will appear to be short puffs, or if you overlap them somewhat, it will appear to be a continuous billow.
      If you want the smoke to move for the entire program, then when a circle reaches the top of the screen, you must change it's Y value back to the height of the chimney.  For this reason, each circle must have it's own Y value.

-----------------------------------
dani190
Mon Dec 19, 2005 9:04 pm


-----------------------------------
ok so do i half to double this code

YOval := whatever the height of the chimney is 

loop   %just put it in the main loop 
Draw.FillOval (Chimney_PositionX, YOval, 10, 10, grey) 

YOval += 3   %or whatever 

if YOval > maxy then     % If the circle is above the top of the screen 
    YOval := whatever the height of the chimney is     %Restarts the circle at the chimney 
end if 
end loop



if i double this code i will get more than 1 circle which i have done but now they will not move up to look like real smoke 
This is my code now with the grey circles:



setscreen ("graphics:max,max,offscreenonly")




colorback (blue)
cls





var c : int
var y1 : int
var x1 : int
var countx, county : int
var row : int
var column : int
var a, b : int
var x2, y2 : int
var x, y : int
var Pic1 : int
var Pic2 : int
var YOval : int
var x3, y3 : int


a := 420
b := 50
c := blue
countx := 10
county := 7
x := 1300
y := 600
x1 := 1300
y1 := 400

var h : array 1 .. 4 of int := init (150, 400, 270, 20)    %Roof
var d : array 1 .. 4 of int := init (250, 250, 400, 20)    %Roof




loop

    %Smoke start
    YOval := 430


    Draw.FillOval (230, YOval, 10, 10, grey)

    YOval := -3

    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 440


    Draw.FillOval (230, YOval, 10, 10, grey)

    YOval := -3 %or whatever
    delay (1)
    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 450


    Draw.FillOval (230, YOval, 10, 10, grey)

    YOval := -3
    delay (1)
    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 460


    Draw.FillOval (230, YOval, 10, 10, grey)

    YOval := -3
    delay (1)
    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 430


    Draw.FillOval (220, YOval, 10, 10, grey)

    YOval := -3

    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 440


    Draw.FillOval (220, YOval, 10, 10, grey)

    YOval := -3
    delay (10)
    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 450


    Draw.FillOval (220, YOval, 10, 10, grey)

    YOval := -3
    delay (10)
    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 460


    Draw.FillOval (220, YOval, 10, 10, grey)

    YOval := -3
    delay (10)
    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if

    YOval := 470


    Draw.FillOval (220, YOval, 10, 10, grey)

    YOval := -3
    delay (10)
    if YOval > maxy then % If the circle is above the top of the screen
        YOval := 250 %Restarts the circle at the chimney
    end if
    %Smoke End



    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)   %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)    %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfilloval (240, 80, 5, 5, black)             %Door Knob
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)   %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)   %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)   %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)   %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)   %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)   %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)   %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)   %Rail of left window (left side)









    a := a
    b := b + 5


    exit when b > 130



    delay (150)

    cls
    colorback (c)
    drawfilloval (x1, y1, 20, 20, yellow)

    if b > 1000
            then
        drawfillbox (475, 120, 480, 125, white)
        drawfillbox (520, 120, 525, 125, white)
        if b = 130
                then
            Draw.FillBox (420, 50, 601, 140, brightblue)
        end if
    end if




end loop


loop

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)     %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)     %Garage Door
    Draw.FillBox (350, 140, 300, 170, yellow)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, yellow)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfilloval (240, 80, 5, 5, black)             %Door Knob
    drawfillbox (205, 250, 250, 400, red)           %Chiminy
    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    drawfillbox (475, 120, 480, 125, white)
    drawfillbox (520, 120, 525, 125, white)
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)       %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)     %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)     %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)     %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)     %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)     %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)     %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)     %Rail of left window (left side)


    delay (50)     %Controls how fast the sun moves!


    colorback (blue)


    cls


    drawfilloval (x, y, 20, 20, yellow)


    exit when x = 0
    x := x - countx
    y := y - county
    if y > 500 then
        county := 0
        if x < 300 then
            county := +10

            a := a
            b := b - 8

            exit when b > 130


        end if

    end if


end loop





x := 2
y := 300
countx := 10
county := 7


loop



    View.Set ("graphics:max,max,offscreenonly")

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)     %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)     %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfilloval (240, 80, 5, 5, black)             %Door Knob
    drawfillbox (205, 250, 250, 400, red)           %Chiminy
    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)       %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)     %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)     %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)     %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)     %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)     %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)     %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)     %Rail of left window (left side)


    a := a
    b := b - c
    c := 0
    if b = 100 then
        c := 0
    end if







    delay (50)     %Controls how fast the moon moves!


    colorback (black)



    cls




    locate (Rand.Int (1, maxrow), Rand.Int (1, maxcol))
    put "*"





    drawfilloval (x, y, 20, 20, white)


    exit when x > 1500
    x := x + countx
    y := y + county
    if y > 500 then
        county := 0
        if x > 750 then
            county := -7
        end if
    end if






end loop


how can i make this so that the grey circles will move up like real smoke?

-----------------------------------
Albrecd
Mon Dec 19, 2005 9:09 pm


-----------------------------------
You need to add to YOval, not subtract from it.

another thing
 if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 440

You should replace the YOval := 250 with YOval := 440 INSIDE THE IF STATEMENT (I don't mean to yell but that's very important to the sucess of the program) Get rid of the YOval := that is outside of the if statement or each time it will reset the circle's position and It won't move.

-----------------------------------
dani190
Mon Dec 19, 2005 9:14 pm


-----------------------------------
umm it says Yoval has no value?

-----------------------------------
Albrecd
Mon Dec 19, 2005 9:29 pm


-----------------------------------
What line of code does it say that in? Are you still saying YOval := 430 before the if statement? I should have specified, you still need to say YOval := 430 first, but it must be before the loop that the if statement is in.

-----------------------------------
dani190
Mon Dec 19, 2005 9:42 pm


-----------------------------------
umm so i just declare YOval := 430 once and then all those drawfilloval's i put in my code will just keep coming up at the same place but several of them

-----------------------------------
Albrecd
Mon Dec 19, 2005 9:44 pm


-----------------------------------
You have to put a cls in the loop (I'd put it at the very beginning)

NOTE: this will also clear the rest of the images, so you'll have to redraw them too (there is no way around this)

-----------------------------------
dani190
Mon Dec 19, 2005 9:45 pm


-----------------------------------
sry were?

-----------------------------------
Albrecd
Tue Dec 20, 2005 9:01 am


-----------------------------------
In your code you have:

loop 

    %Smoke start 
    YOval := 430 


    Draw.FillOval (230, YOval, 10, 10, grey) 

    YOval := -3 

    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 440 


    Draw.FillOval (230, YOval, 10, 10, grey) 

    YOval := -3 %or whatever 
    delay (1) 
    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 450 


    Draw.FillOval (230, YOval, 10, 10, grey) 

    YOval := -3 
    delay (1) 
    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 460 


    Draw.FillOval (230, YOval, 10, 10, grey) 

    YOval := -3 
    delay (1) 
    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 430 


    Draw.FillOval (220, YOval, 10, 10, grey) 

    YOval := -3 

    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 440 


    Draw.FillOval (220, YOval, 10, 10, grey) 

    YOval := -3 
    delay (10) 
    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 450 


    Draw.FillOval (220, YOval, 10, 10, grey) 

    YOval := -3 
    delay (10) 
    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 460 


    Draw.FillOval (220, YOval, 10, 10, grey) 

    YOval := -3 
    delay (10) 
    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 

    YOval := 470 


    Draw.FillOval (220, YOval, 10, 10, grey) 

    YOval := -3 
    delay (10) 
    if YOval > maxy then % If the circle is above the top of the screen 
        YOval := 250 %Restarts the circle at the chimney 
    end if 
    %Smoke End 

Instead, you should have:

%Smoke Start

counter := 0
YOval := 430
YOval2 := 430
YOval3 := 430
YOval4 := 430
YOval5 := 430

loop

counter += 1

Draw.FillOval (230, YOval, 10, 10 grey)
Draw.FillOval (230, YOval2, 10, 10 grey)
Draw.FillOval (230, YOval3, 10, 10 grey)
Draw.FillOval (230, YOval4, 10, 10 grey)
Draw.FillOval (230, YOval5, 10, 10 grey)

YOval += 3
if counter > 5 then %This value will determine the distance between the first and second circles  (a greater number will cause more distance)
    YOval2 += 3
end if
if counter > 10 then %This value will determine the distance between the second and third circles
    YOval3 += 3
end if
if counter > 15 then %This value will determine the distance between the third and fourth circles
    YOval4 += 3
end if
if counter > 20 then %This value will determine the distance between the fourth and fifth circles
    YOval5 += 3
end if

if YOval > maxy then
    YOval := 430
end if
if YOval2 > maxy then
    YOval2 := 430
end if
if YOval3 > maxy then
    YOval3 := 430
end if
if YOval4 > maxy then
    YOval4 := 430
end if
if YOval5 > maxy then
    YOval5 := 430
end if

end loop
%End Smoke


-----------------------------------
Albrecd
Tue Dec 20, 2005 9:06 am


-----------------------------------
Sorry, I noticed a few errors in the code that I gave you:

1) there should be a comma before grey in the Draw.FillOvals

2) there should be a cls at the beginning of the loop

3) there should be a delay somewhere (either before the cls or after the Draw.FillOvals)

-----------------------------------
dani190
Tue Dec 20, 2005 10:45 am


-----------------------------------
woot woot it works thx man

-----------------------------------
Albrecd
Tue Dec 20, 2005 12:29 pm


-----------------------------------
No problem  :)  that's what we're here for.

-----------------------------------
dani190
Tue Dec 20, 2005 12:46 pm


-----------------------------------
this is what i have now

setscreen ("graphics:max,max,offscreenonly")




colorback (blue)
cls





var c : int
var y1 : int
var x1 : int
var countx, county : int
var row : int
var column : int
var a, b : int
var x2, y2 : int
var x, y : int
var Pic1 : int
var Pic2 : int
var YOval, YOval1, YOval2, YOval3, YOval4, YOval5 : int
var counter : int

a := 420
b := 50
c := blue
countx := 10
county := 7
x := 1300
y := 600
x1 := 1300
y1 := 400

var h : array 1 .. 4 of int := init (150, 400, 270, 20)    %Roof
var d : array 1 .. 4 of int := init (250, 250, 400, 20)    %Roof

%Smoke Start

counter := 0
YOval := 430
YOval2 := 430
YOval3 := 430
YOval4 := 430
YOval5 := 430

loop
    cls
    counter += 1
    delay (100)
    Draw.FillOval (230, YOval, 10, 10, grey)
    Draw.FillOval (230, YOval2, 10, 10, grey)
    Draw.FillOval (230, YOval3, 10, 10, grey)
    Draw.FillOval (230, YOval4, 10, 10, grey)
    Draw.FillOval (230, YOval5, 10, 10, grey)

    YOval += 3
    if counter > 5 then %This value will determine the distance between the first and second circles  (a greater number will cause more distance)
        YOval2 += 3
    end if
    if counter > 10 then %This value will determine the distance between the second and third circles
        YOval3 += 3
    end if
    if counter > 15 then %This value will determine the distance between the third and fourth circles
        YOval4 += 3
    end if
    if counter > 20 then %This value will determine the distance between the fourth and fifth circles
        YOval5 += 3
    end if

    if YOval > maxy then
        YOval := 430
    end if
    if YOval2 > maxy then
        YOval2 := 430
    end if
    if YOval3 > maxy then
        YOval3 := 430
    end if
    if YOval4 > maxy then
        YOval4 := 430
    end if
    if YOval5 > maxy then
        YOval5 := 430
    end if


    %End Smoke



    loop




        Draw.FillBox (150, 50, 400, 250, brightred) %house box
        Draw.FillBox (401, 50, 620, 160, brightgreen) %Garage
        Draw.FillBox (420, 50, 601, 140, brightblue) %Garage Door

        Draw.FillBox (350, 140, 300, 170, grey)     %house window Right side
        Draw.FillBox (200, 140, 250, 170, grey)     %house window Left side
        Draw.FillBox (1800, 1, 1, 50, green)        %Grass in front
        Draw.FillBox (250, 110, 200, 50, grey)      %Door
        drawfilloval (240, 80, 5, 5, black)         %Door Knob
        drawfillbox (205, 250, 250, 400, red)       %Chiminy

        Draw.FillBox (a, b, 601, 50, black)         %Garage part2
        Draw.FillPolygon (h, d, 3, green)           %Roof of house
        Draw.ThickLine (350, 170, 300, 170, 5, black) %Rail of right window (top)
        Draw.ThickLine (300, 138, 300, 170, 5, black) %Rail of right window (left side)
        Draw.ThickLine (350, 138, 300, 138, 5, black) %Rail of right window (Botten)
        Draw.ThickLine (350, 140, 350, 170, 5, black) %Rail of right window (right side)
        %----------------------------------------------------------------------------------
        Draw.ThickLine (200, 170, 250, 170, 5, black) %Rail of left window (top)
        Draw.ThickLine (250, 140, 250, 170, 5, black) %Rail of left window (right side)
        Draw.ThickLine (200, 140, 250, 140, 5, black) %Rail of left window (bottem)
        Draw.ThickLine (200, 140, 200, 170, 5, black) %Rail of left window (left side)








        a := a
        b := b + 5


        exit when b > 130
        View.Update


        delay (150)

        cls
        colorback (c)
        drawfilloval (x1, y1, 20, 20, yellow)

        if b > 1000
                then
            drawfillbox (475, 120, 480, 125, white)
            drawfillbox (520, 120, 525, 125, white)
            if b = 130
                    then
                Draw.FillBox (420, 50, 601, 140, brightblue)
            end if
        end if




    end loop



    loop

        Draw.FillBox (150, 50, 400, 250, brightred) %house box
        Draw.FillBox (401, 50, 620, 160, brightgreen) %Garage
        Draw.FillBox (420, 50, 601, 140, brightblue) %Garage Door
        Draw.FillBox (350, 140, 300, 170, yellow)     %house window Right side
        Draw.FillBox (200, 140, 250, 170, yellow)     %house window Left side
        Draw.FillBox (1800, 1, 1, 50, green)        %Grass in front
        Draw.FillBox (250, 110, 200, 50, grey)      %Door
        drawfilloval (240, 80, 5, 5, black)         %Door Knob
        drawfillbox (205, 250, 250, 400, red)       %Chiminy
        Draw.FillBox (a, b, 601, 50, black)         %Garage part2
        drawfillbox (475, 120, 480, 125, white)
        drawfillbox (520, 120, 525, 125, white)
        Draw.FillPolygon (h, d, 3, green)           %Roof of house
        Draw.ThickLine (350, 170, 300, 170, 5, black)   %Rail of right window (top)
        Draw.ThickLine (300, 138, 300, 170, 5, black) %Rail of right window (left side)
        Draw.ThickLine (350, 138, 300, 138, 5, black) %Rail of right window (Botten)
        Draw.ThickLine (350, 140, 350, 170, 5, black) %Rail of right window (right side)
        %----------------------------------------------------------------------------------
        Draw.ThickLine (200, 170, 250, 170, 5, black) %Rail of left window (top)
        Draw.ThickLine (250, 140, 250, 170, 5, black) %Rail of left window (right side)
        Draw.ThickLine (200, 140, 250, 140, 5, black) %Rail of left window (bottem)
        Draw.ThickLine (200, 140, 200, 170, 5, black) %Rail of left window (left side)

        View.Update
        delay (50) %Controls how fast the sun moves!


        colorback (blue)


        cls


        drawfilloval (x, y, 20, 20, yellow)


        exit when x = 0
        x := x - countx
        y := y - county
        if y > 500 then
            county := 0
            if x < 300 then
                county := +10

                a := a
                b := b - 8

                exit when b > 130


            end if

        end if


    end loop





    x := 2
    y := 300
    countx := 10
    county := 7


    loop



        View.Set ("graphics:max,max,offscreenonly")

        Draw.FillBox (150, 50, 400, 250, brightred) %house box
        Draw.FillBox (401, 50, 620, 160, brightgreen) %Garage
        Draw.FillBox (420, 50, 601, 140, brightblue) %Garage Door

        Draw.FillBox (350, 140, 300, 170, grey)     %house window Right side
        Draw.FillBox (200, 140, 250, 170, grey)     %house window Left side
        Draw.FillBox (1800, 1, 1, 50, green)        %Grass in front
        Draw.FillBox (250, 110, 200, 50, grey)      %Door
        drawfilloval (240, 80, 5, 5, black)         %Door Knob
        drawfillbox (205, 250, 250, 400, red)       %Chiminy
        Draw.FillBox (a, b, 601, 50, black)         %Garage part2
        Draw.FillPolygon (h, d, 3, green)           %Roof of house
        Draw.ThickLine (350, 170, 300, 170, 5, black)   %Rail of right window (top)
        Draw.ThickLine (300, 138, 300, 170, 5, black) %Rail of right window (left side)
        Draw.ThickLine (350, 138, 300, 138, 5, black) %Rail of right window (Botten)
        Draw.ThickLine (350, 140, 350, 170, 5, black) %Rail of right window (right side)
        %----------------------------------------------------------------------------------
        Draw.ThickLine (200, 170, 250, 170, 5, black) %Rail of left window (top)
        Draw.ThickLine (250, 140, 250, 170, 5, black) %Rail of left window (right side)
        Draw.ThickLine (200, 140, 250, 140, 5, black) %Rail of left window (bottem)
        Draw.ThickLine (200, 140, 200, 170, 5, black) %Rail of left window (left side)


        a := a
        b := b - c
        c := 0
        if b = 100 then
            c := 0
        end if




        View.Update


        delay (50) %Controls how fast the moon moves!


        colorback (black)



        cls

        delay (100)
        randint (row, 1, 20)
        randint (column, 1, 126)
        locate (row, column)
        color (white)
        put "*"




        drawfilloval (x, y, 20, 20, white)


        exit when x > 1500
        x := x + countx
        y := y + county
        if y > 500 then
            county := 0
            if x > 750 then
                county := -7
            end if
        end if






    end loop
end loop


but now i only get 1 smoke puff, eirlier when i tried this i got the 5, can anybody help me fix this 
Thanks

-----------------------------------
Albrecd
Tue Dec 20, 2005 1:13 pm


-----------------------------------
If you're using offscreenonly then you'll need a View.Update after you draw the ovals.

-----------------------------------
dani190
Tue Dec 20, 2005 1:19 pm


-----------------------------------
ok nvm man i got it to work thanks everyone im almost done!!!  :D  :D

-----------------------------------
dani190
Tue Dec 20, 2005 4:53 pm


-----------------------------------


setscreen ("graphics:max,max,offscreenonly")
colorback (blue)
cls
var x, y : int
var y1, x1 : int
var x2, y2 : int
var countx, county : int
var row : int
var column : int
var a, b, c : int
var YOval, YOval1, YOval2, YOval3, YOval4, YOval5 : int
var counter : int

a := 420
b := 50
c := blue
countx := 10
county := 7
x := 1300
y := 600
x1 := 1300
y1 := 400

var h : array 1 .. 4 of int := init (150, 400, 270, 20)    %Roof
var d : array 1 .. 4 of int := init (250, 250, 400, 20)    %Roof






%Smoke Start 

counter := 0 
YOval := 430 
YOval2 := 430 
YOval3 := 430 
YOval4 := 430 
YOval5 := 430 

loop 

counter += 1 

Draw.FillOval (230, YOval, 10, 10 ,grey) 
Draw.FillOval (230, YOval2, 10, 10 ,grey) 
Draw.FillOval (230, YOval3, 10, 10 ,grey) 
Draw.FillOval (230, YOval4, 10, 10 ,grey) 
Draw.FillOval (230, YOval5, 10, 10 ,grey) 

YOval += 3 
if counter > 5 then  
    YOval2 += 3 
end if 
if counter > 10 then  
    YOval3 += 3 
end if 
if counter > 15 then 
    YOval4 += 3 
end if 
if counter > 20 then  
    YOval5 += 3 
end if 

if YOval > maxy then 
    YOval := 430 
end if 
if YOval2 > maxy then 
    YOval2 := 430 
end if 
if YOval3 > maxy then 
    YOval3 := 430 
end if 
if YOval4 > maxy then 
    YOval4 := 430 
end if 
if YOval5 > maxy then 
    YOval5 := 430 
end if 


%End Smoke 






    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)     %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)     %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfilloval (240, 80, 5, 5, black)             %Door Knob
    drawfillbox (205, 250, 250, 400, red)           %Chiminy

    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)     %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)     %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)     %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)     %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)     %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)     %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)     %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)     %Rail of left window (left side)








    a := a
    b := b + 5


    exit when b > 130
    View.Update


    delay (150)

    cls
    colorback (c)
    drawfilloval (x1, y1, 20, 20, yellow)

    if b > 1000
            then
        drawfillbox (475, 120, 480, 125, white)
        drawfillbox (520, 120, 525, 125, white)
        if b = 150
                then
            Draw.FillBox (420, 50, 601, 140, brightblue)
        end if
    end if




end loop



loop


    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)     %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)     %Garage Door
    Draw.FillBox (350, 140, 300, 170, yellow)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, yellow)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfilloval (240, 80, 5, 5, black)             %Door Knob
    drawfillbox (205, 250, 250, 400, red)           %Chiminy
    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    drawfillbox (475, 120, 480, 125, white)
    drawfillbox (520, 120, 525, 125, white)
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)       %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)     %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)     %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)     %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)     %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)     %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)     %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)     %Rail of left window (left side)

    View.Update
    delay (50)     %Controls how fast the sun moves!


    colorback (blue)


    cls


    drawfilloval (x, y, 20, 20, yellow)


    exit when x = 0
    x := x - countx
    y := y - county
    if y > 500 then
        county := 0
        if x < 300 then
            county := +10

            a := a
            b := b - 8

            exit when b > 130


        end if

    end if


end loop





x := 2
y := 300
countx := 10
county := 7


%Smoke Start 

counter := 0 
YOval := 430 
YOval2 := 430 
YOval3 := 430 
YOval4 := 430 
YOval5 := 430 

loop 

counter += 1 

Draw.FillOval (230, YOval, 10, 10 ,grey) 
Draw.FillOval (230, YOval2, 10, 10 ,grey) 
Draw.FillOval (230, YOval3, 10, 10 ,grey) 
Draw.FillOval (230, YOval4, 10, 10 ,grey) 
Draw.FillOval (230, YOval5, 10, 10 ,grey) 

YOval += 3 
if counter > 5 then %This value will determine the distance between the first and second circles  (a greater number will cause more distance) 
    YOval2 += 3 
end if 
if counter > 10 then %This value will determine the distance between the second and third circles 
    YOval3 += 3 
end if 
if counter > 15 then %This value will determine the distance between the third and fourth circles 
    YOval4 += 3 
end if 
if counter > 20 then %This value will determine the distance between the fourth and fifth circles 
    YOval5 += 3 
end if 

if YOval > maxy then 
    YOval := 430 
end if 
if YOval2 > maxy then 
    YOval2 := 430 
end if 
if YOval3 > maxy then 
    YOval3 := 430 
end if 
if YOval4 > maxy then 
    YOval4 := 430 
end if 
if YOval5 > maxy then 
    YOval5 := 430 
end if 


%End Smoke 






    View.Set ("graphics:max,max,offscreenonly")

    Draw.FillBox (150, 50, 400, 250, brightred)     %house box
    Draw.FillBox (401, 50, 620, 160, brightgreen)     %Garage
    Draw.FillBox (420, 50, 601, 140, brightblue)     %Garage Door

    Draw.FillBox (350, 140, 300, 170, grey)         %house window Right side
    Draw.FillBox (200, 140, 250, 170, grey)         %house window Left side
    Draw.FillBox (1800, 1, 1, 50, green)            %Grass in front
    Draw.FillBox (250, 110, 200, 50, grey)          %Door
    drawfilloval (240, 80, 5, 5, black)             %Door Knob
    drawfillbox (205, 250, 250, 400, red)           %Chiminy
    Draw.FillBox (a, b, 601, 50, black)             %Garage part2
    Draw.FillPolygon (h, d, 3, green)               %Roof of house
    Draw.ThickLine (350, 170, 300, 170, 5, black)       %Rail of right window (top)
    Draw.ThickLine (300, 138, 300, 170, 5, black)     %Rail of right window (left side)
    Draw.ThickLine (350, 138, 300, 138, 5, black)     %Rail of right window (Botten)
    Draw.ThickLine (350, 140, 350, 170, 5, black)     %Rail of right window (right side)
    %----------------------------------------------------------------------------------
    Draw.ThickLine (200, 170, 250, 170, 5, black)     %Rail of left window (top)
    Draw.ThickLine (250, 140, 250, 170, 5, black)     %Rail of left window (right side)
    Draw.ThickLine (200, 140, 250, 140, 5, black)     %Rail of left window (bottem)
    Draw.ThickLine (200, 140, 200, 170, 5, black)     %Rail of left window (left side)


    a := a
    b := b - c
    c := 0
    if b = 100 then
        c := 0
    end if




    View.Update


    delay (30)     %Controls how fast the moon moves!


    colorback (black)



    cls

    delay (100)
    randint (row, 1, 20)
    randint (column, 1, 126)
    locate (row, column)
    color (white)
    put "*" ..




    drawfilloval (x, y, 20, 20, white)


    exit when x > 1500
    x := x + countx
    y := y + county
    if y > 500 then
        county := 0
        if x > 750 then
            county := -7
        end if
    end if






end loop


ok so i want to keep that snow going the whole time does anybody know how i can modify my code to allow that?
Also i want to add light in the windows at night time but then get them to turn off half way? how can i do this?(filling them with yellow but duno how to get the code to do it and go back to grey after)

-----------------------------------
dani190
Tue Dec 20, 2005 4:53 pm


-----------------------------------
sorry not snow i want the smoke!

-----------------------------------
MysticVegeta
Tue Dec 20, 2005 6:35 pm


-----------------------------------
Using Trig fcns for the movement of moon and sun would actualy save a lot of code and will be accurate.

-----------------------------------
dani190
Tue Dec 20, 2005 9:42 pm


-----------------------------------
huh, im in grade 10 course i duno what you are talking about

-----------------------------------
do_pete
Wed Dec 21, 2005 11:44 am


-----------------------------------
He's talking about trigonometry functions lke sine and cosine

-----------------------------------
dani190
Wed Dec 21, 2005 3:34 pm


-----------------------------------
well i have no clue what that is

-----------------------------------
Albrecd
Wed Dec 21, 2005 4:27 pm


-----------------------------------
Trig functions are definatly not required for grd. 10 computers.

-----------------------------------
MysticVegeta
Wed Dec 21, 2005 6:31 pm


-----------------------------------
Hmm I am in Grade 10, I have them in my course... I have used them in my Grade 9 CS course too... what school do you go to dani?

-----------------------------------
do_pete
Wed Dec 21, 2005 6:31 pm


-----------------------------------
Actually they are definatly needed in the creation of some games such as overhead shooters
