Take vs get in inform 7

Hey does anyone know how to modify the “get” command in Inform 7? I wrote a bit in a game where a player is supposed to be unable to “take” a roadkill armadillo unless they’re holding a spatula:

instead of taking the roadkill armadillo for the first time:
if player is holding spatula, say “You jam the spatula between the asphalt and the armadillo and expertly flip it into the air like a flapjack. Nice, looks like you got it unstuck! You pocket the now loose armadillo.”;
if player is holding spatula, now player is holding armadillo;
if player is not holding spatula, say “It’s stuck to the asphalt; you’re not getting it loose without some sort of implement.”

Since Inform seems to understand “take” and “get” as synonymous, I stupidly assumed modifying one would automatically modify the other. But I guess it doesn’t. Yet trying to code in “instead of getting armadillo…” or “understand ‘get’ as taking” just breaks the whole game. Is there a way to disable getting?

2 Likes

That instead rule doesn’t apply after the first attempt to get the armadillo. Subsequent attempts will succeed with or without the spatula.

I don’t know if this is the best way to approach it, but I think this works:

The roadkill armadillo can be stuck. The roadkill armadillo is stuck.

Check taking the roadkill armadillo when the roadkill armadillo is stuck:
	if the player is holding the spatula:	
		say "You jam the spatula between the asphalt and the armadillo and expertly flip it into the air like a flapjack. Nice, looks like you got it unstuck!";
		now the roadkill armadillo is not stuck;
	otherwise:
		say "It’s stuck to the asphalt; you’re not getting it loose without some sort of implement.” instead.

Love the Midnight Pals, btw. :grinning:

4 Likes

Ahhhh, of course! XP Thanks, much obliged! :slight_smile:

2 Likes

Is this game an adaptation of The Texas Chainsaw Massacre?

-Wade

2 Likes

Reminds me of this Gary Larson cartoon:

toolsofthecommoncrow

2 Likes

:grinning: Which, in turn, reminds me of his (in)famous Cow Tools cartoon:

Cow_Tools_cartoon

(It even has its own Wikipedia entry.)

1 Like

Which reminds me of… (and the rest of the topic is us sharing our favourtie Far Side cartoons! :smiley: )

3 Likes

Hi Bitter Karella. I was able to complete your game without ever obtaining the spatula. At first I wasn’t able to pick up the armadillo, and then suddenly I was. There was no special message to tell me how I’d done it, just the usual “taken”. I replayed the game and discovered that I was able to pick it up while holding the stick. I assumed that this was the solution to the puzzle and that the spatula was a red herring.

Fun game by the way!

Well, at least the game was still playable lol XP Thanks for the kind words!

Really fun and I enjoyed the setting - I’ve driven across Nevada so it brought back memories.

Now I need to go back and work out how to obtain the spatula!

1 Like