I need help with turning lights on.
Author |
Message |
SUPERPROgrammer
|
Posted: Mon May 25, 2009 5:42 pm Post subject: I need help with turning lights on. |
|
|
Hello! I was wondering if someone could check over my program to see why the dark blue room isn't changing colours. Also, why is there a random oval/light over there on the bottom right room.
Description: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Condo Lights Test.t |
Filesize: |
4.33 KB |
Downloaded: |
75 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
saltpro15
![](http://compsci.ca/v3/uploads/user_avatars/9776171634ced6278d14c2.png)
|
Posted: Mon May 25, 2009 7:32 pm Post subject: RE:I need help with turning lights on. |
|
|
don't use massive if statements, it's a bad habit to get into.
And I'm not sure what you mean, there isn't a random light/ oval for me...
|
|
|
|
|
![](images/spacer.gif) |
Dusk Eagle
![](http://compsci.ca/v3/uploads/user_avatars/78727197549dd7290a342c.png)
|
Posted: Mon May 25, 2009 7:53 pm Post subject: Re: I need help with turning lights on. |
|
|
I would highly recommend you look into arrays and enumerated types. They would make your life much, much easier.
The reason your hallway won't change colors is because you have made it the same color as your outline (the line that separates all the rooms). The easiest way to fix this is to simply make the hallway a different color by default.
Your second problem is simply that, when living room is false, you are drawing a different color oval than the room's color. Fix this and no oval will appear.
|
|
|
|
|
![](images/spacer.gif) |
SUPERPROgrammer
|
Posted: Mon May 25, 2009 8:21 pm Post subject: Re: I need help with turning lights on. |
|
|
Thanks everyone for all your help! I might consider learning and doing those methods you guys were talking about.
|
|
|
|
|
![](images/spacer.gif) |
|
|