...Wait a moment. Are you starting a New Game *each* and every time you're making a change to the Story, to see if your story changes are in effect?
Because if you don't start a New Game, you will not see your changes in effect. Making changes to the Story and then loading up a save-game won't work; the Story rules for a save are defined/set only when the game starts a New Game.
I ran into this issue when I was working on my Lone Wolf mod. Zixzax was refusing to acknowledge my changes no matter how many times I loaded, but when I finally started a new game to test something else, the changes I had made earlier (that I thought didn't work) were finally in effect.
You can have your party teleport to a Trigger in your jail cell or whatever immediately after Character Creation for testing purposes.
Edit:
Revision of my earlier attempt-
INIT
DB_JailBreak("LeftJail", False);
KB Section
IF
CharacterLeftTrigger(_Char,TRIGGER_CellFloor)
AND
_Char.IsPlayer()
THEN
NOT DB_JailBreak("LeftJail", False);
DB_JailBreak("LeftJail", True);
IF
CharacterSawCharacter(CHARACTER_Guard,CHARACTER_Player)
AND
DB_JailBreak("LeftJail", _boolCheck)
AND
_boolCheck
THEN
Stuff
I reload the story everytime. Usually i reload the story and the level just incase. Theres a bug with the editor that when you reload enough times while having automatic dialog it'll mess up as soon as you start and you have to restart the editor.
At least for me anyways lol. So i restart the editor every few tries.
Rhidian your newest attempt says "THEN unexpected"
IF
CharacterLeftTrigger(_Char,TRIGGER_PlayerCell)
AND
_Char.IsPlayer()
THEN
NOT DB_JailBreak("LeftJail", False);
DB_JailBreak("LeftJail", True);
IF
CharacterSawCharacter(CHARACTER_LUCS_NPC_M_N_ImmaculatePrisonPatrolGuardBase_000,CHARACTER_Player2)
AND
DB_JailBreak("LeftJail", _boolCheck)
AND
_boolCheck
THEN
DialogStartTwoSpeakerDialog("guardcatchkey",CHARACTER_LUCS_NPC_M_N_ImmaculatePrisonPatrolGuardBase_000,CHARACTER_Player2);
Noal i think the combat workaround will look really strange.. entering combat then having it stop everytime the guard sees you.