This is an odd one. I have zinc powder in a mortar (container). If I type 'get powder' I get an 'I can't see that' response, but if I type 'get zinc', the following script works just fine and the zinc is added to my container. Not a big deal, but just trying to tidy it up. The object name is zinc powder and I added EDIT: an alternative name 'powder' just to test. Same results.
if (Got(container of TNT)) {
msg ("You pour the zinc powder into the container of TNT. You toss the mortar and pestle aside.")
RemoveObject (container of TNT)
AddToInventory (container of mixed chemicals)
RemoveObject (zinc powder)
}
else if (Got(empty container of salt)) {
msg ("You add the zinc powder to the empty container of salt.")
RemoveObject (empty container of salt)
AddToInventory (container of zinc powder)
RemoveObject (zinc powder)
}
else {
msg ("You don't have a container appropriate for carrying around the fine powder.")
}
Another minor clean-up... I get two room description messages after this script finishes:
SetObjectFlagOn (showers, "showers used")
SetObjectFlagOff (lever2, "water running")
firsttime {
msg ("You take a chance and exit the shower stall. You hear what sounds like singing from the other two stalls and decide it might be best to get out of here for now. You scurry ever so quietly out of the shower area, through the dining hall, and back out into the hallway.")
MoveObject (Xanadu, Long Hallway)
}
otherwise {
MoveObject (Xanadu, Showers)
}
There are no elaborate scripts that run when entering the long hallway. Just a normal room description.
And how do I stop this from running? I do not want this to run after a certain event is triggered at end game.
<script>
Commons.exovercount = Commons.exovercount + 1
if (Commons.exovercount % 10 = 0) {
n = GetRandomInt (0, ListCount (game.suntzu) - 1)
msg ("A voice booms over the loud speakers, " + StringListItem(game.suntzu, n))
}
</script>
And lastly, near the end of the game I want to remove all objects the player is carrying except for two of them. I will not now exactly which objects the player might be carrying at that time. Is there an easy way to do this without removing all objects individually?
Thanks again!