Goldenrod111 wrote:
I want that rule to run only when the player is taking the lightbulb from the lamp, and the action to run normally every other time. Are you saying that it might not run even then?
Try the following and you'll see what I mean:
Code:
The lamp shop is a room. The light bulb is in the lamp shop. The antique lamp and the modern lamp are containers in the lamp shop.
Instead of removing the light bulb from the antique lamp:
say "Light bulb removed from the antique lamp.";
silently try taking the light bulb.
After taking the light bulb when the light bulb was in the modern lamp:
say "Light bulb removed from the modern lamp."
Test me with "get bulb/put bulb in antique lamp/get bulb/put bulb in antique lamp/get bulb from antique lamp/put bulb in modern lamp/get bulb/put bulb in modern lamp/get bulb from modern lamp"
The antique lamp uses "removing it from", the modern lamp uses "taking". The difference is that "removing it from" applies
only when the player types TAKE BULB FROM LAMP, but not when they type TAKE BULB (when the bulb is in the lamp), and it is likely that most players use the shorter version of the command. When the bulb is not in a lamp taking is not affected at all.