Hypothetical Scene: Newb questions in the form of an Example
BTownTKD
29 Jan 2013, 17:47So I have constructed a hypothetical scene, and was wondering if someone could help me conceive the proper layout and scripts. This would go a long way towards giving me a solid "feel" for the inner workings of Quest 5.
So, here's the scene (and a couple of issues I have observed, below):
[Room: The side of the road]
[list][*]The side of the road contains a "car," which is an object AND a room.
[list][*]The car is scenery, which is hyperlinked in the room's description.[/*:m]
[*]The car can be opened and closed.[/*:m]
[*]If the car is open, an exit "in" is revealed on the compass, allowing the player to enter the car (as well as handling additional textual commands like "get in car," "enter car," etc).[/*:m]
[*]If the car is closed, the exit is hidden. You can't get in the car.[/*:m]
[*]The description of the car is different, depending on whether you're inside or outside of the car.[/*:m]
[*]The car door can (once again) be opened and closed from inside the car, revealing or blocking the exit.[/*:m]
[*]Inside the car, there is a glove-box
[list][*]the glovebox can be opened and closed.[/*:m]
[*]If opened, the glovebox reveals a flashlight which can be taken.[/*:m]
[*]If closed, the glovebox does not reveal the flashlight[/*:m][/list:u][/*:m][/list:u][/*:m][/list:u]
With my own, simplistically-straightforward implementation, I've noticed a couple problems:
[list][*]I've flagged the car as "room and object," "openable/closeable," and it is contained inside the "side of the road" room. With this implementation, the glovebox (inside the car) is visible from the side of the road, which I don't want. I want to require the player to enter the car before they can see or interact with the glove box[/*:m]
[*]The (Windows) script UI for "reveal an exit" is not listing my desired exit in the drop-down list. I may be approaching the entire "open/close a door before revealing an exit" thing poorly...[/*:m][/list:u]
I'm basically asking for an example implementation of the above scenario (with possibly some comments as towards the reasoning behind some of the design decisions). It's a rather meaty example, but I think it could serve as a great example for others attempting to enter the world of Quest 5 (including myself).
So, here's the scene (and a couple of issues I have observed, below):
[Room: The side of the road]
[list][*]The side of the road contains a "car," which is an object AND a room.
[list][*]The car is scenery, which is hyperlinked in the room's description.[/*:m]
[*]The car can be opened and closed.[/*:m]
[*]If the car is open, an exit "in" is revealed on the compass, allowing the player to enter the car (as well as handling additional textual commands like "get in car," "enter car," etc).[/*:m]
[*]If the car is closed, the exit is hidden. You can't get in the car.[/*:m]
[*]The description of the car is different, depending on whether you're inside or outside of the car.[/*:m]
[*]The car door can (once again) be opened and closed from inside the car, revealing or blocking the exit.[/*:m]
[*]Inside the car, there is a glove-box
[list][*]the glovebox can be opened and closed.[/*:m]
[*]If opened, the glovebox reveals a flashlight which can be taken.[/*:m]
[*]If closed, the glovebox does not reveal the flashlight[/*:m][/list:u][/*:m][/list:u][/*:m][/list:u]
With my own, simplistically-straightforward implementation, I've noticed a couple problems:
[list][*]I've flagged the car as "room and object," "openable/closeable," and it is contained inside the "side of the road" room. With this implementation, the glovebox (inside the car) is visible from the side of the road, which I don't want. I want to require the player to enter the car before they can see or interact with the glove box[/*:m]
[*]The (Windows) script UI for "reveal an exit" is not listing my desired exit in the drop-down list. I may be approaching the entire "open/close a door before revealing an exit" thing poorly...[/*:m][/list:u]
I'm basically asking for an example implementation of the above scenario (with possibly some comments as towards the reasoning behind some of the design decisions). It's a rather meaty example, but I think it could serve as a great example for others attempting to enter the world of Quest 5 (including myself).
HegemonKhan
30 Jan 2013, 01:03I'm still quite a noob, and don't know any programming like you do already, so take this with a grain of salt, as I could be wrong
hopefully, the other much more knowledgeable people will help you with this, too. But, here I go at it
------------
I think you'll probably need to implement the ' scope ' codes, to get (some of) your desired results:
http://quest5.net/wiki/Category:All_Fun ... t_Commands
----------
If the glovebox object is a ' child ' of the car object+room, then it should automatically not be visable when the car is closed (did you set the car as a ' closed_container ' ? And, of course the car must not be set as being transparent too, lol)
>
ah, you set the car as ' openable/closeable ' , while my knowledge is limited, this is mainly for implementing a ' door or window ' type of object, vs an actual openable and closeable container type of object. So, maybe this might be causing you some problems, by having the car set as ' openable/closeable '.
>
but, I'm not sure how the ' container types ' match up with the ' room and object ' setting, at how they interact with one another.
----------
I'm glad you're asking this scenerio, as I've tried to do a similar one, but had trouble with it, myself. Though, on trying a different aspect, that isn't included in your scenerio.
instead of doing the room description effects as you, I tried to implement a locked door along with it. So, for your scenerio example, include trying to implement a locked car door, requiring car keys to unlock+open the door, thus now allowing you to enter the car, vs being unable to enter the car with the car door closed+locked. Also, have this car door then be lockable+closeable and unlockable+openable from the inside of the car, as well as from the outside of the car, with the car keys.
----------
for your inside vs outside of the car descriptions, you'll probably have to have:
5.2 quest version = player <--> game.pov = 5.3 quest version
so, if using v5.2, then simply replace my ' game.pov ' with ' player '
if (not game.pov.parent = your car object name),
-> msg (outside of the car description)
if (game.pov.parent = your car object name),
-> msg (inside of the car description)
but, you'll have to figure out, or get help from others, on how to implement this with the room descriptions.
---------------
an alternative method, if you're using v5.3, you can simply have the car set as being ' dark ', to hide the objects inside of it. having some kind of light switch or other method to then ' light ' up the car upon opening the door and~or entering the car.
http://quest5.net/wiki/SetDark
http://quest5.net/wiki/SetLight
http://quest5.net/wiki/SetObjectLightstrength
http://quest5.net/wiki/SetExitLightstrength
http://quest5.net/wiki/CheckDarkness
hopefully, the other much more knowledgeable people will help you with this, too. But, here I go at it

------------
I think you'll probably need to implement the ' scope ' codes, to get (some of) your desired results:
http://quest5.net/wiki/Category:All_Fun ... t_Commands
----------
If the glovebox object is a ' child ' of the car object+room, then it should automatically not be visable when the car is closed (did you set the car as a ' closed_container ' ? And, of course the car must not be set as being transparent too, lol)
>
ah, you set the car as ' openable/closeable ' , while my knowledge is limited, this is mainly for implementing a ' door or window ' type of object, vs an actual openable and closeable container type of object. So, maybe this might be causing you some problems, by having the car set as ' openable/closeable '.
>
but, I'm not sure how the ' container types ' match up with the ' room and object ' setting, at how they interact with one another.
----------
I'm glad you're asking this scenerio, as I've tried to do a similar one, but had trouble with it, myself. Though, on trying a different aspect, that isn't included in your scenerio.
instead of doing the room description effects as you, I tried to implement a locked door along with it. So, for your scenerio example, include trying to implement a locked car door, requiring car keys to unlock+open the door, thus now allowing you to enter the car, vs being unable to enter the car with the car door closed+locked. Also, have this car door then be lockable+closeable and unlockable+openable from the inside of the car, as well as from the outside of the car, with the car keys.
----------
for your inside vs outside of the car descriptions, you'll probably have to have:
5.2 quest version = player <--> game.pov = 5.3 quest version
so, if using v5.2, then simply replace my ' game.pov ' with ' player '
if (not game.pov.parent = your car object name),
-> msg (outside of the car description)
if (game.pov.parent = your car object name),
-> msg (inside of the car description)
but, you'll have to figure out, or get help from others, on how to implement this with the room descriptions.
---------------
an alternative method, if you're using v5.3, you can simply have the car set as being ' dark ', to hide the objects inside of it. having some kind of light switch or other method to then ' light ' up the car upon opening the door and~or entering the car.
http://quest5.net/wiki/SetDark
http://quest5.net/wiki/SetLight
http://quest5.net/wiki/SetObjectLightstrength
http://quest5.net/wiki/SetExitLightstrength
http://quest5.net/wiki/CheckDarkness
homeeman
01 Feb 2013, 00:30See the attached file.
A good trick to remember is the opening/closing scripts. You can do just about anything with those, and making objects invisible is a great way to "remove" them (as far as the player can tell) without actually getting rid of them and potentially losing them. The rest of what you asked for is fairly straightforward and obvious, and just comes with practice, and I won't insult you by trying to explain it.
Just take a look at the file and let me know if I missed anything or if you're still not quite getting it.
A good trick to remember is the opening/closing scripts. You can do just about anything with those, and making objects invisible is a great way to "remove" them (as far as the player can tell) without actually getting rid of them and potentially losing them. The rest of what you asked for is fairly straightforward and obvious, and just comes with practice, and I won't insult you by trying to explain it.
Just take a look at the file and let me know if I missed anything or if you're still not quite getting it.