I’ve recently began programming an IF using Inform 7. here are my problems, and I’m unsure how to fix them:
I have an enemy character that needs to be defeated before access to a piece of treasure: how do I program combat?
How do I give that treasure a point value?
How do I fix a container to one place (so It cannot be ‘taken’)?
How do I make the floor collapse after the treasure is taken and remove access to that area?
How do I let the player repair the floor to grant access again?
The last two are not necessary, but the first 3 are.
That depends on how complex system you want to build, ranging from a simple ATTACK GUARD to a full-blown combat system. There are a lot of examples in the Recipe Book chapter 7.5. (the link to the Recipe Book is at the bottom of the documentation’s index). You might also want to take a look at Victor Gjisbers’ ATTACK extension.
You can find examples in the chapter 11.4. of the Recipe Book.
Give it the property “fixed in place” (manual chapter 3.6.)
These are a bit hard to answer without further details. The general solution would be to give the floor property “intact” or “collapsed”, switch the status when the treasure is taken and check the status with an instead rule to prevent access.
thanks. the last part, i new would be harder. it would have just been an added thing to make the game interesting. i did not know about the Recipe Book, so thanks.