So, i’m very very new to this, only my second day running here. I’m coding a short interactive story that’s 100% exploration based using detailed item descriptions to tell a story. Well I want to make it so that if you have one item, it will change the description of another item when you find it. Is there any If/otherwise statements I could use to achieve this?
Can you be a little more specific about what you want? Does item B only change its description if you find item A first? Is it that item A interacts somehow with item B to change it? Does the change happen out of sight, or will you see it happening? We can absolutely help if we get a little more detail about what you want to do. If you have code, even non-functional code, for what you want to do, you can post it to give us an idea.
Essentially, there exists within the game a symbol that the player character has never seen before. That symbol is on many objects, and I want it to say “A symbol you’ve never seen before” for the first item and “The symbol you’ve found on other items” if you already found one of them.
OK. Would something like this work?
Lab is a room.
Something can be found. Something is usually not found.
Check examining something:
now the noun is found.
The widget is here. The description is "[if the doodad is found]It has a picture of a cat on it.[otherwise]It has a picture of a dog on it."
The doodad is here. The description is "[if the widget is found]It has a picture of a cat on it.[otherwise]It has a picture of a dog on it."
This might get really complicated if you have dozens of items with different symbols, but for just a few things this is OK.
Do you want the description of the first item to change as well, once you’ve found the others? If not, try this:
The first symbol found is an object that varies.
To say symbol description:
if the first symbol found is nothing, now the first symbol found is the item described;
if the item described is the first symbol found, say "that strange symbol";
otherwise say "the symbol you've seen elsewhere".
A mirror is a thing. The description of the mirror is "It has [symbol description on it."
A knife is a thing. The description of the knife is "Engraved with [symbol description]."
If so, though, that’s even easier:
Definition: a thing is sigilled if it is the mirror or it is the knife.
To say symbol description: say "the symbol [if the number of handled sigilled things is at least two]you've seen before[else]you've never seen elsewhere[end if]".
Hey, so I just tried to do this finally, and I’m having a bit of a problem with it. I have edited it to fit instead of just saying thing and what not. I assumed that was what you meant me to do.
Definition: a description is signaled if it is an Amulet or it is the Leather Square.
To say symbol description: say "It has a symbol [if the number of handled signaled things is at least one]you've seen before. A circular symbol from that other object you found earlier. A circle with a Stick going from the top to half way down, with a smaller circle at the tip.Now that you've had time to ponder, you wounder if maybe it's depicting the sword being lifted to the heavens in that tapestry you found.[else]you've never seen before. It depicts a large outer circle, with a line going from the top to about half way down, with a smaller circle at the tip of the line. You ponder what it could mean, but nothing comes to mind.[end if]".
You want “a thing is signaled”, not a description.
It Worked! Thanks alot!
Jamitha’s effort is very interesting, s/he doing basically the same narrative this grognard coder is doing with TADS3, and this should the different intended audience for Inform 7/10 and TADS 3.
Hope you can complete your work in a pair of months, I feel that the comparision between your work and my little showcase in the Spring thing’s backgarden will be interesting…
Best regards from Italy,