Re: Inform: Making godly commands


20 Aug 1995 14:40:39 GMT

"Sam Hulick" <shulick@cherry.ucs.indiana.edu> wrote:
> I want to make a command (for debugging) called "grab" that will
> teleport an object to me.

There are already the commands "purloin thing" and "abstract thing to
thing" which may do what you want.

> Why is it that "gonear" can reference any object in the game, even way
> out of scope, but my "grab" command can't?

Because the parser treats various debugging verbs in a special way. See
the code for `SearchScope' in `parser.h'. If you want to emulate this
behaviour in your code, you need to either edit `parser.h' yourself, or
else write your own scope routine that puts all your objects into scope,
for example:

Ifdef DEBUG;

[ Everything i;
for (i = selfobj + 1: i <= top_object: i++)
PlaceInScope(i);
];

Verb "grab" * scope=Everything -> Grab;

Endif;

--
Gareth Rees