drop all of player's items automatically

Hello folks,

I think I need your help. I’m using Inform 7 and I want to make the player drops all the items he have obtained after doing an action.
Can anybody give me an example of source about this action?

I tried this:

After examining xxxxxx:
the player drops everything.
now the player is in zzzzzzz

But it doesn’t work.

Thanks

After examining xxxxxx: repeat with x running through things carried by the player, begin; now x is in the location; end repeat; now the player is in zzzzzzz

More simply:

now everything carried by the player is in the location.

Or, if you want special effects of dropping the items to fire (e.g. if a Ming vase should shatter when dropped):

repeat with the item running through carried things: try dropping the item.

1 Like

It works, thank you zarf. Now I have another problem. I put double condition in a single after rule, but both condition is not working. It only works with only one condition. This is what I typed(don’t worry about tabs, I typed with tabs in my source. You know what I mean):

After examining window:
now everything carried by the player is in the location.
now the player is in Jail.

I want everything carried by the player dropped and also he forced to be in Jail. Would you mind telling me about this?

Thanks before

You have two periods (or full stops if you’re British) in your sentence. Change the first one to a semicolon.

Haha, it’s so simple. Thank you so much. I have no background about programming, LOL :smiley: