Off and On-stage, if Player does... and so on.

Touchable is not a value one can set easily (if one can, and I’m not sure). It is set by the positioning of an object etc and not by direct messings.

What you want to do is (I think):

[code]An idea is in the Personal Office. It is scenery. The description is “You can’t really [italic type]see[roman type] and idea. It’s more a matter of feeling.”

Instead of touching the idea, say “Yeah, you can really feel it!” [note: I didn’t check if “touch” and “feel” are the same, I’m going by memory]
[/code]

At this point, you can do whatever with your idea, except taking it if not via another instead or similar rule.

Edit: Ouch, Felix. Too fast for me :slight_smile:

Anyway, the “scenery” value means an object is there but is not listed in the room’s description. Also, it is fixed in place, so you cannot move it.

Also, while not a thorough example:

Personal Office is a room. "You're sitting in your home office staring blankly at the white papersheet on the left side of Inform7's GUI."

Instead of thinking:
	Say "It suddenly hits you!";
	Move the Idea to the player.

The Void is a room.

The Idea is in the Void.

Test me with "l/think/i".

Yeah, I love this approach. I don’t think you have to put things in a fake room to make this work, though (I think this is I6 old habits). Just say “An Idea is a thing (etc)”. And then:

Instead of thinking: Say "It suddenly hits you!"; now the Idea is carried by the player.

You’re absolutely right. This also works:

[code]
Personal Office is a room. “You’re sitting in your home office staring blankly at the white papersheet on the left side of Inform7’s GUI.”

The Idea is a thing.

Instead of thinking:
Say “It suddenly hits you!”;
Now the idea is carried by the player.

Test me with “l/think/i”[/code]

More resource friendly.

[pre-posting UPDATE: While I was typing, a bunch of people posted some of the stuff I was going to say, but I hope this is helpful.]

The problem is that, if Inform doesn’t think you can reach or touch the Idea to begin with, then the game won’t even understand a command that refers to the idea. So a rule along the lines of “If the player takes an idea…” won’t work, because you don’t even get to the rules for taking an idea – the game won’t even process the option “TAKE IDEA,” because it doesn’t understand “IDEA” as something you can interact with at the moment.

[It also won’t work because you don’t want the rule to start “If the player takes an idea…” If you’ve got a rule for taking an idea, it should begin something like “Before taking an idea…” or “Instead of taking an idea…” or “Carry out taking an idea…” See chapters 7, 12, and 18 of the documentation – hopefully you won’t need to read all the way through all three of those to understand what I’m saying, though!]

Inform has some complicated rules to decide whether something is visible (which basically means you can refer to it in a command) or touchable. That’s why it’s saying you can’t set that directly; Inform wants to be able to calculate that by itself. If you want to take something that wouldn’t be visible otherwise, and make it visible so that the player can refer to it in a command, you have to place it in scope. The way to do this is described in section 17.27 of the manual.

That won’t let you take the idea, though, because in order to take something you have to be able to touch it. Section 12.18 might help here.

I think that if you put these together, it may do what you want. I tried something along these lines and it seemed to work:

Brain is a room. An idea is a thing in Brain. After deciding the scope of the player when taking or examining: Place the idea in scope. Rule for reaching inside Brain: allow access.

(“When taking or examining” means you can take the idea, or examine the idea, but you can’t put it on the table. Actually a better thing to do would probably be to write a rule that blocks any action involving the idea other than taking or examining, as discussed here.)

You’ll note that this is pretty complicated! Another thing you could do [pre-posting UPDATE: as Felix says] is actually put the idea in the room, but make it scenery (so the game doesn’t print “You can see an idea here”) and portable (so you can take it); though then you’d only be able to take the idea in that room. You’ll also want to make sure people can’t do anything outlandish with the idea once they have it, unless you want them to. And you might want to think of a way [pre-posting UPDATE: as I4L says] to let people do something with “think” or similar commands, because most people aren’t going to try “take idea.” After all, ordinary ideas can’t be picked up in real life.

Wow!!

Thank you all for all that input, so fast!

A lot to digest, but hey; this looks fun. And I think I’ve got the idea ( :smiley: ) now.

I will try to solve the problem with this new information, although I had slightly different plans for it.
When the player “gets” the idea, a counter starts. If he doesn’t use the idea fast enough, it will vanish.
Or something like that

M:)rten

Ok, I more or less managed to pull this off by myself.
(I stole some ideas from this thread though)

Although this IS working (kinda), I can see several small problems.

First of all, to be able to count I turned the Idea into a device that is switched on, and counted when switched on.
Not the best solution maybe? :mrgreen:

Secondly, and this is the real problem:
It should not start to count until the player thinks. Now it starts counting wether you try to feel the Idea or if you just wait.

I managed to turn the variable back to zero though, struggled a bit until I understood it was a matter of positioning in the code.

Anyway, it has been fun so far!

M:)rten

(Going to look into the other solutions mentioned now)

[edit: PS, I’m not sure now, if An Idea (which is the device) and the Idea is two different things. Not sure how I could check that]

I think you don’t need neither a counter nor a scene running.

The syntax (not tested) could be

[code]Instead of thinking:
Say “It suddenly hits you!”;
Move the Idea to the player;
Now the idea is switched on; [watch out for periods and colons… a period strops the rule]
The time runs out in 6 turns from now.

At the time when the time runs out:
now the idea is switched off;
remove the idea from play.[/code]

Inform7 has a nice way to run daemons.

Yeah. The articles are not important. Usually.

Edit: Watch out for indents, also. They are mandatory.

Cool. That worked. Thx!

M:)rten

I think indents are only important to rules that contain some kind of control phrase, like “if” or “repeat”.

The problems with your code as it stood was

Instead of thinking: Say "It suddenly hits you!"; Move the Idea to the player. An Idea is switched on.
You had a full stop after “player”, which meant the rule ended there; in consequence “An Idea is switched on” was read as initializing the switched property of the idea (so the idea started out switched on).

When UseIdea begins: Every turn when An Idea is switched on: Increase SomeNumber by 1; say SomeNumber;
You can’t put an “every turn” rule inside a “when scene begins” rule like that (generally, you can’t put a rule inside another rule like that (though, you can tell a rule to consider/follow another rule)). Inform read this as

[code]When UseIdea begins: do nothing.

Every turn when An Idea is switched on: Increase SomeNumber by 1; say SomeNumber.[/code]
So nothing special happened when UseIdea began; and since the idea was switched on from start, the counter started immediately.

I got to thinking about this whole business of managing things the player can think about. I think maybe having an idea object and moving it to the player is perhaps a bit artificial. Here’s an example I whipped up that I think may do what’s needed.

[code]The dining hall is a room. “You can go south from here.”

The kitchen is south of the dining hall. “You can go north from here.” A banana is in the kitchen.

Thinking about is an action applying to one visible thing. Understand “think about [any thing]” as thinking about.

A thing can be known or unknown. A thing is usually unknown. A thing has a number called memory. The memory of a thing is usually 6.

Before printing the name of something (called the target):
now the target is known;
now the memory of the target is 6.

Every turn when the location of the banana is not the location of the player:
decrease the memory of the banana by 1.

Check thinking about the banana:
if the banana is unknown or the memory of the banana is less than 1:
say “Banana? What banana?”;
stop the action.

Report thinking about the banana:
say “Possibly the banana is yellow.”

Test me with “think about banana / s / think about banana / n / think about banana / g / g / g / g / g”.[/code]
The point of this is that the player can think about the banana for some number of turns after leaving the vicinity of the banana, but eventually the memory of the banana will fade, until the banana is forgotten.

This code could easily be modified so that the memory of some items lasts longer than the memory of others, or so that things can be thought about even before they’re encountered. It would malfunction, however, if the things being thought about are scenery, because the name of a scenery item is not printed when the room description is printed.

Thanks for this. You gave me the solution for what I was struggling with now.
I tried to use

Instead of using: Say "You managed to use the idea."
but it refused to compile.

It worked however when I wrote the rule as “Using is an action…”

I’m struggling a bit with the solution felix gave.

Trying to figure that one out now.

Anyway, again. Thx for solutions. I’ve learned a lot today!

M:)rten

Nice solution, as mentioned, but I’ve been trying to stop the timer.
Can that be done without a counter in action?

M:)rten

“The time runs out in 6 turns from now” in effect creates a counter that gets the name “the time runs out” and that counts down from 6 (I suppose).

The rule “At the time when the time runs out” tells the game what to do when the counter “the time runs out” reaches 0.

So it seems, it does what you want. (You’ll find it documented in Ch. 9.11)

So I thought, I was writing it wrong. sometimes I keep on going for to long :slight_smile:

Morten

Well, I am beginning to be able to achieve kinda difficult tasks. ( I think I know enough now to actually write a short and easy game. )

BUT, i can’t get this particular thing to work.

I don’t want stuff to show up as “There is a Thingy” here. It is not supposed to be visible until after a task has been done.

Ok, so I make it a scenery. But then I can’t take it (cause it’s fixed.)
(( I have also tried to make it both scenery and portable, but the respons is anyway “that’s hardly portable”. ))

The MOST annoying thing, however, is that I actually found a word that could be used instead of scenery…

  1. That particular code wasn’t saved, for some reason :frowning:
  2. I can’t seem to find that word again.

There might be a good trick of word-combination that would make me be able to search the word in either documentation or forum, but words as “invisible” “not” “visible” “description” (and so on) generates an astounishing amount of (not relevant) hits :slight_smile:

Any way. Thx

M:)rten

There are a couple ways around this (I thought you could make something both scenery and portable, but could be wrong), but have you considered just leaving the object off-stage and then moving it into the room after the task has been done? I think that’s how it’s usually done.

I’d probably go by Matt’s suggestion. As for the lost word, it may have been “undescribed” (doc. 3.24).
You can create portable scenery; but to actually take it, you also need to unlist or replace the can’t take scenery rule.
(The debug commands RULES and ACTIONS are very useful devices, if you want to find out what’s happening on the I7 level in a game.)

Yes, I tried the “move to from off-stage” and that works.

I just thought there was a way to override the description nonetheless. Undescribed MIGHT have been the word, thx :slight_smile:

When moving something onto stage ie “move balloon to table” then there will be a
“You can see a balloon on the table” after the description. Which again gives the description I don’t want. (Always, ofcourse I like the function and will use it, as well, but sometimes I don’t want it)

After examining:
   if the noun is table, say "You carefully search the table and to your big surprise; there is a reasonable big blue balloon on top of it   which you for some reason failed to see thus far.";
   move balloon to [the room I'm in atm, let's say JungleJunction].

Since the balloon is revealed in the examining text, I would like to override it after the examine, move to room routine has been done.

But thx anyway :slight_smile:
There might be some creative ways to solve this I haven’t figured out yet. A challenge? I like those…

M:)rten

Try the “rules” command that Felix suggested – that’ll tell you which rule is producing the text that you don’t want, and then you’ll be able to unlist it or modify it. (My guess is that it’s the “describe what’s on scenery supporters rule,” though I may have the name slightly wrong.)