Issue revealing items when breaking the container open.
sbangs
23 Nov 2010, 23:39I have a cabinet which has 2 items the player needs. I am using a custom script in the tail section of the plane, which is below.
If the player has "fire extinguisher" and "storage cabinet" is in the current room Then {
Open "storage cabinet"
Reveal "container pack"
Reveal "canopy"
Print "[SIZE 00]You destroy the cabinet, revealing 2 items inside!"
Remove "canopy" from its parent object
Remove "container pack" from its parent object
Make "storage cabinet" inaccessible }
The issue is both the canopy and the container pack are not being revealed and cannot be interacted with. From play testing the only thing I know for certain is that when I type "smash cabinet with fire extinguisher" that the text statement fires off and the cabinet does in fact become inaccessible.
Any ideas why my 2 items inside the cabinet are not being exposed?
If the player has "fire extinguisher" and "storage cabinet" is in the current room Then {
Open "storage cabinet"
Reveal "container pack"
Reveal "canopy"
Print "[SIZE 00]You destroy the cabinet, revealing 2 items inside!"
Remove "canopy" from its parent object
Remove "container pack" from its parent object
Make "storage cabinet" inaccessible }
The issue is both the canopy and the container pack are not being revealed and cannot be interacted with. From play testing the only thing I know for certain is that when I type "smash cabinet with fire extinguisher" that the text statement fires off and the cabinet does in fact become inaccessible.
Any ideas why my 2 items inside the cabinet are not being exposed?
sbangs
24 Nov 2010, 07:11Well, i figured it out.
I guess there is a difference between using Quest to "open" a container and using a custom script. Appearently there is more happening when Quest uses the default "open" selection in the GUI to open a container, then just using the "open object" command.
Turns out I never had to reveal a child object, but I did have to LOOK at it again. So this revised script works when opening a container thru other means.
So the below script now works when the player types in "smash cabinet with fire extinguisher"
If the player has "fire extinguisher" and "storage cabinet" is in the current room Then {
Open "storage cabinet"
Print "[SIZE 00]You destroy the cabinet, revealing 2 items inside![NEW LINE]You see a container pack and a folded canopy."
Execute "look cabinet" as if it were typed by the player }
Also, after you use the Look command again, you can then follow it with make cabinet inaccessible and the containers items still remain.
The response is now appropriate. I need the objects to show in the display with the bold font, so the players can be made very aware. I like the side GUI options, but don't want the players to have to get used to looking over there all the time. Especially in this situation, where the player has seconds left to assemble the parachute
However, I like the ability to sneak an object in on the right hand side and not have it show up in the description, as that feature has its situations.
Cheers,
Scott
I guess there is a difference between using Quest to "open" a container and using a custom script. Appearently there is more happening when Quest uses the default "open" selection in the GUI to open a container, then just using the "open object" command.
Turns out I never had to reveal a child object, but I did have to LOOK at it again. So this revised script works when opening a container thru other means.
So the below script now works when the player types in "smash cabinet with fire extinguisher"
If the player has "fire extinguisher" and "storage cabinet" is in the current room Then {
Open "storage cabinet"
Print "[SIZE 00]You destroy the cabinet, revealing 2 items inside![NEW LINE]You see a container pack and a folded canopy."
Execute "look cabinet" as if it were typed by the player }
Also, after you use the Look command again, you can then follow it with make cabinet inaccessible and the containers items still remain.
The response is now appropriate. I need the objects to show in the display with the bold font, so the players can be made very aware. I like the side GUI options, but don't want the players to have to get used to looking over there all the time. Especially in this situation, where the player has seconds left to assemble the parachute

However, I like the ability to sneak an object in on the right hand side and not have it show up in the description, as that feature has its situations.

Cheers,
Scott