Getting Light Source To Not Work In One Room

Darkweaver
So, here's what I'm trying to do.

I have to light sources. One is normal and one is magical.

I want the normal light source to work in every dark room except one, which has a magical darkness. For that room, you need another light source which is magical.

So, I don't want the normal light source to work in that one room.

Now, the way I did this was have all the rooms checked as initially Dark for the normal light. Simple enough.

However, with the other room I'm having a slightly more difficult time. I had to create two room descriptions for that room. One says that if the Player Is Not Carrying Magical Light then it says the room is pitch black and I made all objects Invisible. The other has if the Player Is Carrying Magical Light then the room has the normal description.

For the record, I making the normal lamp say the room is Dark if brought in but that doesn't seem to work.

Any easier way around this the best route to go? If anyone with GUI knowledge has an easier work around, I'm open to ideas. :)

Also, other question not related to making game....

Is there a way to disable autosaving? It seems like I can make changes and not save but yet when I exit, it doesn't give me the warning prompt and I notice it saved my work when I didn't want it to (for example, making a mistake). So, I'm guessing Quest 5.5 autosaves sometimes. That's a good feature but is there anyway to stop it from doing that?

jaynabonne
I think the easiest way is to have the code effectively dim the lamp when you enter the room. Attached is a sample that does that. You can see what I did.

Setup: two rooms, one with an apple and one with a banana. One is dark and the other is "exceptionally dark". In the latter room ("special room"), we don't want the lamp to be able to light it. Both rooms are initially dark, and the lamp is a strong light source. Both rooms have dark descriptions (so you can tell when they're dark.)

The exit in the special room is a weak light source so you can get out. :)

The trick is in the Scripts tab of the special room. Before entering the room, it "unsets" the lamp's "lightsource" flag. That means that while you're in the room, the lamp is no longer a light source. And then, after leaving the special room, it sets the lamp's ligthsource flag again, so it resumes being a light source for the other room(s). If you had another light source (your magical lamp), it would continue to work fine and would light up the room as desired.

Each is a one-line script. Hopefully when you see them, they will make sense!

Darkweaver
jaynabonne wrote:I think the easiest way is to have the code effectively dim the lamp when you enter the room. Attached is a sample that does that. You can see what I did.

Setup: two rooms, one with an apple and one with a banana. One is dark and the other is "exceptionally dark". In the latter room ("special room"), we don't want the lamp to be able to light it. Both rooms are initially dark, and the lamp is a strong light source. Both rooms have dark descriptions (so you can tell when they're dark.)

The exit in the special room is a weak light source so you can get out. :)

The trick is in the Scripts tab of the special room. Before entering the room, it "unsets" the lamp's "lightsource" flag. That means that while you're in the room, the lamp is no longer a light source. And then, after leaving the special room, it sets the lamp's ligthsource flag again, so it resumes being a light source for the other room(s). If you had another light source (your magical lamp), it would continue to work fine and would light up the room as desired.

Each is a one-line script. Hopefully when you see them, they will make sense!

Okay, gonna download that file and try it later in my test game.

If I remember, I download the aslx to the Library. I'll figure that out but I remember what you told me before.

Yeah, see there's this one room that has a sort of magical, sentient darkness. One lamp is normal and the other one works both in regular darkness and draws away the sentient, darkness. If you're in the room with the regular light and try to leave through the west exit (instead of the stairway you came from), you fall into a deep hole and die.... because I'm cruel that way. lol. The magical lamp moves the sentient darkness away, leaving only a still somewhat dark room. :twisted:

My game is inspired from steampunk, Lovecraft and various "real-life" mysteries like David Paulides' book Missing 411. I'm also a big fan of the Infocom classic The Lurking Horror.

Appreciating all the help you're giving me, Jaynabonne. Again, thank you.

jaynabonne
Actually, this isn't a library. This is just a simple Quest game you can load to see how I did what I did. So load it on its own in Quest. You might then be able to apply what I did to your game,

HegemonKhan
just to add to Jay's comments:

probably the best way to help people is to send them actual game files, for them to 'play~study', as while you can just copy and paste posted code into a new game's code view mode (deleting all the default code first), this is a bit more steps to do, laughs.

Also, by using~starting up a game file, you can see how it works~plays, in both GUI~Editor and Code (Code View mode), seeing how they convert back and forth (though it can take a bit of time to switch back and forth to match up the GUI~Editor stuff with how it looks in code). So, this is a really great way to learn quest better.

If I had a computer with quest on it that was online, I would be doing this (attaching game files) too, but I still don't (still trying to decide on what to get for a new computer, lol).

-----------

@Jay,

I didn't post sooner, as I wasn't sure if Darkweaver meant 'library' as thinking you sent him~her a library file, or if he~she has a mac~apple and is talking about having to find his~her downloads in the 'library/downloads folder~directory area'.

P.S.

Thanks for helping out Darkweaver, as you do such an excellent, concise, clear, easy-to-understand, step-by-step, and thorough job of it. :D

Darkweaver
HegemonKhan wrote:just to add to Jay's comments:

probably the best way to help people is to send them actual game files, for them to 'play~study', as while you can just copy and paste posted code into a new game's code view mode (deleting all the default code first), this is a bit more steps to do, laughs.

Also, by using~starting up a game file, you can see how it works~plays, in both GUI~Editor and Code (Code View mode), seeing how they convert back and forth (though it can take a bit of time to switch back and forth to match up the GUI~Editor stuff with how it looks in code). So, this is a really great way to learn quest better.

If I had a computer with quest on it that was online, I would be doing this (attaching game files) too, but I still don't (still trying to decide on what to get for a new computer, lol).

-----------

@Jay,

I didn't post sooner, as I wasn't sure if Darkweaver meant 'library' as thinking you sent him~her a library file, or if he~she has a mac~apple and is talking about having to find his~her downloads in the 'library/downloads folder~directory area'.

P.S.

Thanks for helping out Darkweaver, as you do such an excellent, concise, clear, easy-to-understand, step-by-step, and thorough job of it. :D

You're welcome. I'm highly enjoying Quest, so actually thanks to Alex and all the people involved with this project and putting it up for free. If I weren't flat broke I'd throw a few bucks to this.

jaynabonne
Darkweaver wrote:

"HegemonKhan"


@Jay,

I didn't post sooner, as I wasn't sure if Darkweaver meant 'library' as thinking you sent him~her a library file, or if he~she has a mac~apple and is talking about having to find his~her downloads in the 'library/downloads folder~directory area'.

P.S.

Thanks for helping out Darkweaver, as you do such an excellent, concise, clear, easy-to-understand, step-by-step, and thorough job of it. :D


You're welcome.


Ah, the humor potential of the mentally added comma... Or is it the actually omitted one? Now I'm not sure. lol

But HK, we're all here to try to help (or be helped). I just like to avoid follow-up questions.

(Actually, not really. That was a failed attempt at humor myself, cloaked in one of my occasional forays into obscurity. :) )

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums