As a general point, it is better to check gh_guest_bedroom_curtains.islocked to see if the room is locked, rather than using your own flag.
Quest will set and unset it for you - it is the definitive attribute on the state of a container.
If you are still having problems, you can always just add a command to the room like 'open curtains; open shades; etc... And run a script that sets a flag 'curtains open' and check for curtains open in the room description. Your problem seems familiar to me and I didn't fuss with it - just switched away from a container entirely.
Good luck!
Try copy-pasting the code you think should work into a new game. Or recreate it in a new game. If I've ever changed container types, sometimes I have those problems. Try recreating it in a totally new game. Try deleting everything in your current game and starting over. Good luck!
Neonayon wrote:When you mentioned starting all over, I just about choked on my water.
And I meant, start your container over, not your entire game!
Good luck!
<object name="gh_guest_bedroom_curtains">
<inherit name="editor_object" />
<inherit name="openable" />
<alias>Curtains</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<alt type="stringlist">
<value>curtain</value>
<value>curtains</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<feature_container />
<listchildren />
<takemsg><![CDATA[You can't take them, but you can <i>open</i> and <i>close</i> them!]]></takemsg>
<drop type="boolean">false</drop>
<hidechildren />
<close />
<visible />
<flag type="boolean">false</flag>
<look type="script"><![CDATA[
msg ("<br/>You can see a pair of curtains that are currently {if gh_guest_bedroom_curtains.flag=False:closed and are letting very little light as a result. You can <i>open</i> them if you wish.{once: Beyond them, you can clearly see a window, even if you aren't sure how you didn't notice any when approaching the tree earlier.}}{if gh_guest_bedroom_curtains.flag=True:open and flooding the room with light as a result. You can <i>close</i> them as a result.{once: Outside you can clearly see zombies still wandering the area as well.}} <br/>")
]]></look>
<openscript type="script"><![CDATA[
firsttime {
switch script here! Too much code to post though.
otherwise {
msg ("<br/>You decide to open the curtains once more and feel the warm light from beyond the window pane bathe your {player.skin} skin in it's warmth. Behind you, the light in the room intensifies, brightening all the colors within. You also see the zombies meandering around out there as well. Just when are they going to move on!?<br/>")
}
gh_guest_bedroom_curtains = True
]]></openscript>
<closescript type="script"><![CDATA[
msg ("<br/>Feeling a little paranoid about the zombies, you decide to close the curtains. Now only a tiny beam of light penetrates between them and flows into the room. Luckily, the illumination is strong enough to shine through the material of the curtains as well, you just can't feel the warmth like this.<br/>")
gh_guest_bedroom_curtains = False
]]></closescript>
</object>
</object>
Neonayon wrote:
I have another object that is also Openable/Closable and it works just fine. I even tried manipulating the scripts manually like this...
gh_guest_bedroom_curtains.open=True
gh_guest_bedroom_curtains.open=False
Try this:
gh_guest_bedroom_curtains.isopen=true
gh_guest_bedroom_curtains.isopen=false
not sure if it matters, but you could try lower case of true/false, as maybe capitolized 'True/False' isn't recognized as boolean (constant-special) values.
just thought of this... if you set/changed/added-scripts-to the global (I think: game->whatever tab) 'onenterroom', maybe the problem/conflict/issue lies within it... Also, try checking if you got an 'onenterroom' for that specific room too, and see if the conflict/issue is in there as well.
XanMag wrote:If you are still having problems, you can always just add a command to the room like 'open curtains; open shades; etc... And run a script that sets a flag 'curtains open' and check for curtains open in the room description.
Did you do this? Why does it have to be a switch at all?
Neonayon wrote:
It came up with this error.
Error running script: Error compiling expression 'gh_guest_bedroom_curtains': RootExpressionElement: Cannot convert type 'Boolean' to expression result of 'Element'
<object name="gh_guest_bedroom_curtains">
<inherit name="editor_object" />
<inherit name="openable" />
<alias>Curtains</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<alt type="stringlist">
<value>curtain</value>
<value>curtains</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<feature_container />
<listchildren />
<takemsg><![CDATA[You can't take them, but you can <i>open</i> and <i>close</i> them!]]></takemsg>
<drop type="boolean">false</drop>
<hidechildren />
<close />
<visible />
<flag type="boolean">false</flag>
<look type="script"><![CDATA[
msg ("<br/>You can see a pair of curtains that are currently {if gh_guest_bedroom_curtains.flag=False:closed and are letting very little light as a result. You can <i>open</i> them if you wish.{once: Beyond them, you can clearly see a window, even if you aren't sure how you didn't notice any when approaching the tree earlier.}}{if gh_guest_bedroom_curtains.flag=True:open and flooding the room with light as a result. You can <i>close</i> them as a result.{once: Outside you can clearly see zombies still wandering the area as well.}} <br/>")
]]></look>
<openscript type="script"><![CDATA[
firsttime {
msg("open")
} otherwise {
msg ("<br/>You decide to open the curtains once more and feel the warm light from beyond the window pane bathe your {player.skin} skin in it's warmth. Behind you, the light in the room intensifies, brightening all the colors within. You also see the zombies meandering around out there as well. Just when are they going to move on!?<br/>")
gh_guest_bedroom_curtains.isopen=true
}
]]></openscript>
<closescript type="script"><![CDATA[
msg ("<br/>Feeling a little paranoid about the zombies, you decide to close the curtains. Now only a tiny beam of light penetrates between them and flows into the room. Luckily, the illumination is strong enough to shine through the material of the curtains as well, you just can't feel the warmth like this.<br/>")
gh_guest_bedroom_curtains.isopen=false
]]></closescript>
</object>