temnix Posted September 15, 2021 Share Posted September 15, 2021 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. Quote Link to comment
Guest tipun Posted September 16, 2021 Share Posted September 16, 2021 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. Quote Link to comment
temnix Posted September 16, 2021 Author Share Posted September 16, 2021 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. Quote Link to comment
DavidW Posted September 16, 2021 Share Posted September 16, 2021 You could detect if the trap has been disarmed with Disarmed() in the area script? Quote Link to comment
Guest Morgoth Posted September 16, 2021 Share Posted September 16, 2021 Just check if the player has The Spirit's Shield on his inventory or equipped and you are done anyway. Quote Link to comment
temnix Posted September 17, 2021 Author Share Posted September 17, 2021 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. Quote Link to comment
DavidW Posted September 17, 2021 Share Posted September 17, 2021 But if the trap went off, you can record that fact via the trap script. (I think you're right about Disarmed() in the area script, but you might want to play around with where it does work.) Quote Link to comment
temnix Posted September 24, 2021 Author Share Posted September 24, 2021 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. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.