Hi, that should all be easily achievable just using the GUI. So going step by step, you need to:
a) I want to go from a hallway (h5) DOWN to a basement (bs1) which is by default dark .Select the Basement, go to the 3rd tab labelled "light/dark" and check the box labelled "room is initially dark. You should include an alternate description here to indicate that the player can find the light switch e.g. "The room is pitch black, but by running your hands along the wall you locate what you think is a light switch."
b) There would be a light switch to TURN ON in the basement before I could do anything or search the other 5 basement "rooms".- Create an object in the basement named light switch (or whatever codename you want to use).
- Go to the options tab and from the first box select "object can be switched on/off. Once you've done that an option will appear called "after switching on the object." Click 'add a script' and down near the bottom of the pop up menu there will be an option for "make room light." Select that and choose the basement for the room.
- Finally down the bottom of the same tab is a box labelled "object is a light source." Select that and choose "weak" from the drop down menu. Weak light sources can be used even when the room is dark but they do not illuminate the room.
c) Once the searching is complete, and upon wanting to leaving the basement, I would have toTURN OFF the light before being able to go back UP to the hallway.For this one you need to do a few things.
- First you need to make sure that the exit from the basement to the hall has a name. (Select the exit and add whatever you want to call it to the name field.)
- While you're here, you should add a message to the field marked "Print message when locked," something along the lines of "didn't your father ever teach you not to waste electricity?" so that the player knows they are blocked by the fact they've left the light on.
- Then go to the options tab for the exit, select "object is a light source" and set it to weak.
- Then go back to your light switch object and add another script to the "after switching on the light switch" and choose lock exit, and select the exit you just named.
- Finally, to unlock the exit again once the light is turned off, there is a similar section under the one you've been using called "after switching off the object." You need to add two scripts here, "make room dark" and "unlock exit."
Hope this helps