When the player types "find (something) the game will tell him/her
that's for the author's use only.
The inform 6 code looks like this:
<code>
verb 'find' 'locate' * scope=anything -> Find;
[Anything i;
if (scope_stage == 1) rfalse;
if (scope_stage == 2) {
objectloop (i ofclass Object) PlaceInScope(i); rtrue;}
"No such in game.";];
[FindSub;
move noun to
player; <------
used for debugging by author.
"You now have ",(the)noun, " in your hot little hands.";];
!"Sorry That's for the Author ony only!"; <-----used for final game.
<code>
All suggestions welcomed.
Thanks
I'm not sure why you want to reinvent the library's purloin verb, but
here's a way to do it. Just park your debugging routine in an Instead
rule in a section headed "Not for release," and then write a Check
rule that will run when the Instead rule isn't included.
--JA
[code]
Section 1 - Not for release
Instead of finding:
if the player encloses the noun:
say "You already have [the noun].";
otherwise if the noun is the player:
say "You're right where you usually are.";
otherwise:
now the player carries the noun;
say "You now have [the noun] in your hot little hands."
Section 2 - Other
The Parlor is a room. The Kitchen is north of the Parlor.
A peach is in the Kitchen.
Finding is an action applying to one visible thing. Understand "find
[any thing]" as finding.
Check finding:
say "That command is for the author's use only." instead.
[end code]
> I'm not sure why you want to reinvent the library's purloin verb, but
> here's a way to do it. Just park your debugging routine in an Instead
> rule in a section headed "Not for release," and then write a Check
> rule that will run when the Instead rule isn't included.
this is NOT what I'm looking for.
I want to be able to find an item that is NOT in scope which means it
can be
in any of the other rooms in the game and have it turn up in the
player's hands
or in the location. doesn't matter.
and I want to be able to say "find" rather than "purloin"
>
Did you try the code I posted? I believe it does exactly what you're
looking for. It allows you to 'find' an item in any location (that is,
it's not in scope) and moves it into your hands. Try running it and test
it with 'find the peach'.
Have you tried Jim's code? That's exactly what it does. Type "find
peach" and you'll take it, even though you're in a different room.
The key parts are "[any thing]", which puts every object in scope no
matter where it is, and "an action applying to one visible thing",
where "visible" just means it doesn't have to be touchable.
> and I want to be able to say "find" rather than "purloin"
I'd recommend leaving debugging verbs out of the final game (put the
whole definition in a "Not for release" section), especially if you're
going to change the verb to a common word like that. Players might
legitimately try to "find" something in your game, and a "permission
denied"-type response would be confusing or frustrating.
vw
I tried it and it didn't work for some reason.
When I typed "FIND PEACH"
I got a blank output.
However I figured it out after I made my posting.
This code does work for me:
finding is an action applying to one thing.
No, that won't work. If you delete "visible" and run the code I
posted, it will say "You can't reach into the kitchen."
--JA
before finding:
now the noun is carried by the player;
say "You now have [the noun] in your hot little hands.";
stop;
> I'd recommend leaving debugging verbs out of the final game (put the
> whole definition in a "Not for release" section), especially if you're
> going to change the verb to a common word like that. Players might
> legitimately try to "find" something in your game, and a "permission
> denied"-type response would be confusing or frustrating.
I've placed a list of commands in the game that shows the player the
valid commands along with "red herring" commands.
Also I've notified the player that the FIND verb is strictly
for the author's debugging use alone.
Well, that's one way to do it: "before" rules run before the
touchability check.
vw