Troubleshooting: Spike Trap in bd7230 (spoilers)
jastey
Member Posts: 2,776
In the old Temple of Bhaal, there are three crusaders trapped in cages. A lever on the left can be clicked to kill them by spike traps, which the game considers to be evil (paladins and rangers fall).
If I click the lever with my full party selected, the following happens: the whole group walks towards the lever shoving each other out of the way to get to the marked spot in front of it, the first floating text about what the lever will do appears (~This switch seems tied to the spike trap beneath the cage. Flipping the switch would kill anyone in the cage.~)
Then, after a short timer, the screen shakes a little, the spikes come out, the crusaders die, and the text says: ~You flip the switch and spikes shoot up from the floor.~
Problem: I did not click on the lever again. I clicked it once.
I think this is because the script uses "WalkedToTrigger([ANYONE])" instead of "Clicked([ANYONE])". Since I usually move and interact with my full party selected, I think the script counts this as "six clicks in a row", at least that's the only explanation I have for this behavior.
If I click once with only one party member selected, this does not happen. Two or three might not suffice. But sometimes, three are enough, depending on where they were and from which side they walk to the lever. Using the whole party triggers the spikes every time after one single click.
Interacting with the surrounding while the whole group is selected is normal and totally common in BG(II), be it for talking to people, opening a chest, or picking something from the floor - the one first in line performs the action. It never was counted as "all try to perfom the action one after the other".
I think this needs to be changed.
Redmine?
If I click the lever with my full party selected, the following happens: the whole group walks towards the lever shoving each other out of the way to get to the marked spot in front of it, the first floating text about what the lever will do appears (~This switch seems tied to the spike trap beneath the cage. Flipping the switch would kill anyone in the cage.~)
Then, after a short timer, the screen shakes a little, the spikes come out, the crusaders die, and the text says: ~You flip the switch and spikes shoot up from the floor.~
Problem: I did not click on the lever again. I clicked it once.
I think this is because the script uses "WalkedToTrigger([ANYONE])" instead of "Clicked([ANYONE])". Since I usually move and interact with my full party selected, I think the script counts this as "six clicks in a row", at least that's the only explanation I have for this behavior.
If I click once with only one party member selected, this does not happen. Two or three might not suffice. But sometimes, three are enough, depending on where they were and from which side they walk to the lever. Using the whole party triggers the spikes every time after one single click.
Interacting with the surrounding while the whole group is selected is normal and totally common in BG(II), be it for talking to people, opening a chest, or picking something from the floor - the one first in line performs the action. It never was counted as "all try to perfom the action one after the other".
I think this needs to be changed.
Redmine?
1
Comments
Thanks!
My original question still stands. Do we all agree that this behavior of spikes being activated after the first click is a bug?...
I think I was able to do a proper reaction for this situation without the use of a variable in the switch using the Override file and just checking for Dead("DwarfPrisonerDV") and a local variable to avoid an infinite looping.
Didn't test yet, though.
Oh, and I agree with you that the current behavior is, if not a bug, a suboptimal approach.
@Raduziel Only checking for the prisoner dead doesn't necessarily mean the PC used the spike trap to kill him, though. Checking for the trap sprung (there is a variable) also doesn't mean that it was activated to kill the prisoners.
Actually, I need to add a check in case the player decides to attack the prisoner or my NPC will remain idle until he is killed and just then react - what makes no sense at all.
Yes, they are unarmed and imprisoned, but real warfare is about attacking the enemy where they are weak and vulnerable, and avoiding them where they are strong. I can understand that paladins should not be dishonorable, but Stalker is a ranger kit and can do backstabs. Do you consider stalkers to be self-contradictory?
I will say that I felt really bad about killing them. What I really wanted to do was to either send them back to our own camp or else have them promise to not rejoin the crusade (even if they were lying). There was no such option. And so I activated the trap because it was the fastest way of ending their suffering.
Seems like WalkedToTrigger() persists until it is checked, which I can't say surprises me too much. I'm less certain if nothing was changed in characters bumping each other, though.