
-----------------------------------
Mr. T
Wed Mar 23, 2005 1:01 am

House Project
-----------------------------------
I'm having a few issues with my house project (besides the fact that the teacher made us use evil processes)
----------------------------------
1. Run through day mode, then play again, and rerun the day mode...can anyone figure out why the chimney is suddenly missing a drawline (this causes the entire background to become miscoloured)
2. Run through day/night mode, then choose not to play again...why does my Window.Close not close the window immediately after? Why does it create a smaller window?

-----------------------------------
Token
Wed Mar 23, 2005 6:11 pm


-----------------------------------
okay, the chimny thing... i dont see what ur talking about, maybe post a screenshot or somthin, but the ver u sent me was fine, and with the close window thing, what you did when you started was opened a new window with the command

 winID := Window.Open ("graphics:1010;660,nobuttonbar")

so when you use 

Window.Close (winID)

 it just closes the 1010 by 660 window and returns to the default, i dont know how to get around that tho, 

good luck

-----------------------------------
Token
Wed Mar 23, 2005 9:15 pm


-----------------------------------
okay well i looked at it and the problem seemed to be that while it was drawfill--ing  somthing it was also drawing the house, which caused it to fill the background, then the house, or somthing along those lines, maybe it was that the house was being drawn before the background or somthing, but i looked at the pic and saw that the house was on top so it was executing properly, so i put a delay of 100 ms right before it draws the house and it seems to work fine (line 244) so0o0o enjoy, and i still dont know how to close the window.

-----------------------------------
ssr
Wed Mar 23, 2005 9:27 pm


-----------------------------------
u know u can use cls with View.Update, and View.UpdteArea it'd be much smoother
but anyway gj
 :D

-----------------------------------
Mr. T
Wed Mar 23, 2005 9:58 pm


-----------------------------------
still having issues with Window.Close anyone understand why?

-----------------------------------
jamonathin
Thu Mar 24, 2005 7:01 am


-----------------------------------
It's simple, 

procedure gameOver
    loop
        Font.Draw ("GAME OVER!!!", 80, maxy div 2, gameOverFont, gameOverColour)
        gameOverColour += 1
        delay (100)
        if gameOverColour = 20
                then
            Window.Close (winID)
        end if
    end loop
end gameOver

Where do you exit the loop? You dont. You close the window, then you tell it to display some more text.  Also, your Window.Close command is stuck in 3 loops.  What you have to do is put an . . .
 exit when gameOverColour = 20
in every loop, so the loops know to exit. You also have to change your gameOver procedure, and get rid of the if statement, and put Window.Close at the very end of your program.
If ur not sure on what i was talking about, look at this.
