I'm trying to find a way to have a shut-off for the power make some rooms dark, and I'm trying to figure out how I can tie certain rooms to a switch as to whether the power has been switched off.
Can I attach a value to the rooms I want to do this? Even better, can I create a class of room such that I, for example, define the object as "darkroom" instead of "room" so that I don't have to put some procedure call in a couple hundred rooms.
light
Moderators: Ice Cream Jonsey, joltcountry
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
I found where the problem is. It requires a replace of the findlight routine, and changing rooms to normally be dark. I have my own pseudo light value which goes on if the switch is thrown on, dark if off. Then I revised the Room class to default to dark, and a lit_room class that inherits room but is normally lit.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
I upgraded this room to make an automated change. I have basically this huge warehouse (12x10) that I word processor translated into "warehouse_room" instead of "room". Then I made that a clone class of room but with the "not light" attribute. This way I don't change the Room class.
What was most interesting was setting up the basement room where the gas meter is. Hit it with a 40 ounce sledge hammer and you crack it. Now it starts to hiss. As long as you're in the room it plays the hiss. Leave that room and you can't hear the hiss any more. Come back and the hiss is there again. For the rest of the game. Unless you're stupid enough to use a 2 1/2 pound steel sledge hammer on a leaking gas meter...
I've figured out how to design a typical house. For the reprobate who doesn't live there and likes to search other people's houses...
Next step is how to get multi-location scenery so I can put the same item in several places.
I ain't quite figured out what the game will be about, it was first about using a computer program to generate a 12x10 grid of rooms then going in and changing the special ones. Some of the rooms in the warehouse go to the basement, the catwalk over it, or to the roof.
Oh yeah, got to have the capacity to jump off the roof. Stupid, but a valid thing to try.
What was most interesting was setting up the basement room where the gas meter is. Hit it with a 40 ounce sledge hammer and you crack it. Now it starts to hiss. As long as you're in the room it plays the hiss. Leave that room and you can't hear the hiss any more. Come back and the hiss is there again. For the rest of the game. Unless you're stupid enough to use a 2 1/2 pound steel sledge hammer on a leaking gas meter...
I've figured out how to design a typical house. For the reprobate who doesn't live there and likes to search other people's houses...
Next step is how to get multi-location scenery so I can put the same item in several places.
I ain't quite figured out what the game will be about, it was first about using a computer program to generate a 12x10 grid of rooms then going in and changing the special ones. Some of the rooms in the warehouse go to the basement, the catwalk over it, or to the roof.
Oh yeah, got to have the capacity to jump off the roof. Stupid, but a valid thing to try.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee