Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding Object Text (After Object Taken) #9

Open
nateProjects opened this issue Aug 13, 2015 · 1 comment
Open

Hiding Object Text (After Object Taken) #9

nateProjects opened this issue Aug 13, 2015 · 1 comment

Comments

@nateProjects
Copy link

I can't seem to add text for objects which will no longer show up after the object is taken (when revisiting the same passage).

Below are the relevant parts of my code -

<obj id="Keys" inventoryName="A Set of Keys">
    <action id="Get">
        <when>!story.isInInventory('Keys')</when>
        You take the Set of Keys.
        {{ story.putInInventory('Keys'); }}
        {{ story.disable('findKeys'); }}
    </action>
</obj>
<page id="tree_top">
            <img width="480" src="images/Cyprus_Tree_Top.png"></img>
You're in the top of a tall cypress <show paragraph="seeKeys" id="findKeys">tree</show>.
            Exists: <turn to="dismal_swamp">Down</turn>
</page>

    <paragraph id="seeKeys">You see a Set of <interact with="Keys">Keys</interact> here.</paragraph>

This may be an issue of me not understanding Dedalus properly, but it has kept me from using it. My full code is here.

Any help would be greatly appreciated.

@lepperm
Copy link
Contributor

lepperm commented Aug 22, 2019

Hi there! I know your post is super old, but in case you're still interested, or if there's someone else is just diving into Dedalus (like I am), here's how I've performed an inventory check that's influenced the text that appears on a page.

<paragraph id="lookAround">
    <p>You're standing along the docks.</p>
    {{? story.isInInventory('cellphone') }}
        <p>You slide your cellphone out of your pocket and check your signal - nothing.</p>
    {{?}}
</paragraph>

If the item is consumable or something that the player can lose, I'd instead create a variable that you toggle when the item is consumed/lost/missed that you use as the condition instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants