Page 1 of 1
light
Posted: Tue Sep 20, 2011 4:20 pm
by Tdarcos
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.
Posted: Tue Sep 20, 2011 7:06 pm
by Tdarcos
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.
Posted: Wed Sep 21, 2011 12:02 am
by Roody_Yogurt
Sounds like steps in the right direction to me. Good work, Tdarcos!
Posted: Wed Sep 21, 2011 12:22 pm
by Tdarcos
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.
Posted: Wed Sep 21, 2011 12:28 pm
by Roody_Yogurt
Tdarcos wrote:Next step is how to get multi-location scenery so I can put the same item in several places.
For this, you likely would want to use the "found_in" property.