So, I’m writing a basic game for my first time. My player wakes up one a raft in the middle of the ocean with nothing but an oar. I want the player to be able to padding [direction] because off in the distance he can see a small dot that may be land.
[code]Paddling is an action applying to one room
Understand “paddle [direction]” as paddling[/code]
That is what I have, however it gives me the following error:
Problem. You wrote ‘Paddling is an action applying to one room’ : but an action can only apply to things or to kinds of value, for instance: ‘photographing is an action applying to one visible thing’.
So, what am I doing wrong here? I’d like to actually do two things when the player paddles north, first, change the description of the raft room. Secondly, decrement a counter that when it reaches zero will disable paddling because you will have reached land(I want the player to have to paddle several times). I also want to disable paddling east, west, or south, because that’d be the wrong way.
Could somebody give me a few tips?
You cannot write “paddling is a thing applying to a room”. Like the compiler said, you can only do “paddling is an action applying to one thing” or “paddling is an action applying to nothing”.
To elaborate, you need something like
Paddling is an action applying to one visible thing.
Understand "paddle [direction]" as paddling.
Gorobay, so is [direction] a thing? My program actually compiles now that I say:
Paddling is an action applying to one visible thing
however now when I type paddle it says, “What do you want to paddle?”
I want to paddle in a direction, I don’t want to paddle a thing. How would I fix this?
Section 12.7 of the documentation explains it: “Also, note that if you invent an action which needs to apply to directions like “north” or “south”, you need to make this apply to visible things, because the object used inside Inform to represent the idea of “north” can be seen but not touched. So for understanding purposes, “visible thing” is understood as meaning any visible thing or direction: it’s more general than “thing”, not more specific.”
To make “paddle” work, write
Understand "paddle" as a mistake ("Please supply a direction.").
Another, possibly simpler, approach to the whole problem is to make a few rooms instead of a single “raft room” whose description you manually change. Then you would not need a paddle counter.
Ah, thanks for the help. I have everything mostly working now, however I don’t like the error message. When I try to paddle it says, “What do you want to paddle”. How can I change this to something like, “What direction would you like to paddle?”.
EDIT: Nevermind, I didn’t realize you edited your post. thanks again
Also, looking at your first post, you seem to have forgotten to end sentences with a period. Punctuation is often important in Inform 7.
Blank lines are treated equivalently, so that’s not a problem.
Oh. I’ve somehow missed that. Thanks.
It would be much better to use something like this.
[code]Understand “paddle” as paddling.
Rule for supplying a missing noun while paddling: say “Please supply a direction.”.[/code]
You could then easily add rules to automatically choose the noun is specific cases, like so.
Rule for supplying a missing noun when paddling and (some other condition): now the noun is (whatever).
Hope this helps.