Only use or examine item if...

Hello,

Is it possible to start a game with the restriction of doing something first?

example: in front of you is a newspaper but since you woke up with a hangover you have to take a aspirine first to be able to read whats in the newspaper. In order to take the pill, you have to find the medicine cabinet, a glass and a tap to fill the glass.

I hope someone understands what I am meaning with this. I am completely new so sorry if I'm asking a simple question.


You are asking the wrong question...
Don't ask "Is it possible..."
Ask "How do I..."
This sounds like the start to The Hitchhiker's Guide to the Galaxy...
Anyway...
Just add an attribute to each item...
Each item, when used, clears the attribute of the next thing to use...
IE:
when you try to read the paper, "It is out of focus, and your head still hurts. Maybe an aspirin will help"
(this provides the hint "get an aspirin"...
and walk the player through what they need next.
until they find out it was yesterday's paper. Today's paper would be on the front steps...
(may want to put on a robe first before going out side...)


Thanks a lot!

I was afraid that I had to put a IF script on everything I did from that point on!


BTW. IS it also possible to only take something when a container or box is open?

I used the if scripts: IF object is open (and chose box) --> print message: you grab whats inside.

But how can I script that it is not possible to grab what is inside when it is closed?


Pretty sure containers are like that by default. Make sure the item is actually in it.


How do I place them in it? I've been trying for more than a hour now :)

Only able to fix this with an IF script on the take. And then you are not actually taking it out of the container and putting it in your inventory. Only see a text that says you hold it in your hand now :/

[edit} you are probably supposed to select the container as the parent for the object inside it.
Is there a way to change the line: I cannot see it, when it is closed?


Desktop version, drag the item on to the contain. Web version, on the item, click the Move button towards top right, and select container.


also, there's the built-in 'parent' Object Attribute: http://docs.textadventures.co.uk/quest/attributes/parent.html
and there's the 'MoveObject' Script/Function too: http://docs.textadventures.co.uk/quest/functions/corelibrary/moveobject.html


Thank you.

One more if you don't mind.
How can you script that the container only shows the text (you print): inside the container you see several....
before you take it out. And after that it says it is empty when you open it again?.


I'm not that familiar with the GUI/Editor's options... (Pixie or others can/will help you well with this stuff)

you can try to see if there's controls for it, such as within:

'game' Game Settings Object -> 'Features' Tab -> toggle whatever you want on (this will reveal them, as they're by default hidden, due to there being so many of them, and thus would clutter up the GUI/Editor)

'game' Game Settings Object -> 'Room Description' Tab -> these are global controls, which may have what you're looking for.

'whatever' Room Object -> 'setup' and/or 'room descriptions' Tabs -> maybe these room/container controls have what you want

otherwise, you got to get into editing the built-in code or creating your own....


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

Support

Forums