Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inform 7: Pick up thing based on if specific thing is in inventory

Tags:

inform7

I'm making an adventure with Inform 7. In the adventure, you can pick up a chip. I want to be able to pick up a thing called a pocket computer if you have the chip in your inventory. To put it in a possible inform sentence:

If chip is in the inventory, take pocket computer.
like image 337
beakr Avatar asked Dec 16 '12 20:12

beakr


1 Answers

I think you'd be best served by going about it the other way. After all, portable objects normally can be picked up; what you seem to want to do is to prevent taking it if they don't have the chip. I think something like this could work:

Instead of taking the pocket computer when the player does not have the chip:
say "You need the chip first!"

However, I would consider whether it is reasonable to prevent the player from picking it up. Is the pocket computer fixed in place somehow, and the chip is required to unlock it? Or is it simply that the computer isn't useful until they have the chip? If the latter is the case, I would suggest that you still allow the player to pick it up, since in real life there would be nothing preventing them from doing so. It breaks immersion to prevent a reasonable action simply because it isn't useful yet.

like image 105
Robert J. Walker Avatar answered Jan 04 '23 14:01

Robert J. Walker