Jump to content

"This container has been opened"


Recommended Posts

Is it possible to take account of the party's opening a container, other than by writing checks in its script? The problem with scripts there is that in addition to any checks and globals they also control traps, and when the trap is disarmed, the script is deleted. Also if the container uses a key, having the key in the inventory lets the party bypass the script. There is an action, OpenState(O:Object*,I:Open*BOOLEAN), that looks like it's meant for this, but it doesn't do anything.

Link to comment
Guest tipun

OpenState (O: Object*,I: Open*BOOLEAN) only works for doors.
I can't say about scripts after neutralizing the trap. There is no game nearby.

Link to comment

It looks like an either-or situation with scripts. If the container throws a fireball, then it's disarmable, and then it doesn't throw the fireball or do anything else. The engine doesn't distinguish between trap-character blocks and other conditions that may be set there. On the other hand, shelves are sometimes scripted to sound the alarm, but they are not disarmable.

This sucks, because I had the notion to challenge players to go through the catacombs under Candlekeep without disturbing any of the coffins. There is no reason for good or lawful-aligned characters to pillage the tombs of distinguished sages of the past beneath home, and Tethtoril asks to leave them alone. I would introduce a reward from the grateful dead on exit, if the party abstained from taking any of the treasure in those sepulchres. But it turns out that it's impossible to do this fairly simple thing, take stock of opening containers.

Link to comment
19 hours ago, DavidW said:

You could detect if the trap has been disarmed with Disarmed() in the area script?

I'm not sure that would work from the area script, probably not, but anyway a trap isn't necessarily disarmed if the container is open, and vice versa. Maybe the party just took the damage.

Link to comment

For fun and profit: this is achieved by putting Disarmed() on top of the script, setting the global, and adding this same global under Opened() below. The player will have to do one or the other.

Link to comment
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...