I have no idea if I am using correct words here. I am a programmer but as I recently became very intrigued by Interactive Fiction, I decided to attempt to learn how to use Inform 7.
I am working on a very small game, mostly to be a test to make me learn more about how Inform 7 works.
What I want to do right now, is to have certain objects, that the player can only carry one of at a time.
(In the game, you are an ant; You can only carry one large object at a time).
Right now I have the following code:
a haulable object is a kind of thing. instead of taking a haulable object, say "That is far too big to take with you. You might be able to haul it on your back, however.". The players back is a supporter. understand "haul [something]" or "carry [something] on back" or "haul [something] on back" or "carry [something] on my back" or "haul [something] on my back" or "put [something] on back" or "put [something] on my back" as hauling. Hauling is an action applying to one thing. instead of hauling the noun: if the noun is not a haulable object: say "[the noun] is big nor heavy, and does not need to be carried on your back."; else: if the players back encloses something: say "Your back is full."; else: say "Channeling all your strength, you put [the noun] on your back."; now the noun is on the players back; to say the hauled item: say "[list of the things on the players back with definite articles]". understand "stop hauling" as stop-hauling. Stop-hauling is an action applying to nothing. instead of stop-hauling: if the players back encloses nothing: say "You did not drop anything, as you were not hauling anything on your back."; else: say "You stop hauling [the hauled item] and drop it to the ground."; repeat with the item running through things on the players back: if the location is a tree-room: say "[the noun] starts plunging downward by the pull of gravity."; say "with a large *THUD*, it lands right next to the Northern Exit."; now the item is in the northern exit; else: now the item is in the location;
Now, I want to be able to do the following things:
-Add ‘stop hauling X’ to the possibilities of the stop-hauling action (where X is whatever you are currently carrying).
-Add ‘drop X’ as alias to stop-hauling as well. As ‘drop X’ usually scans through your inventory, how can I change its behaviour to check the players back as well?
-Change ‘put X in Y’ and ‘put X on Y’ to use whatever the player has on their back as possible candidates as well.
How can I make Inform understand these things?
Thank you for your help,