Code
INIT
DB_JailBoolean(1);

KB Section
IF
CharacterLeftTrigger(_Char,TRIGGER_CellFloor)
AND
_Char.IsPlayer()
THEN
CharacterSetVarInteger(_Char, "LeftJail", 1);  

IF
CharacterSawCharacter(CHARACTER_Guard,CHARACTER_Player)
AND
CharacterGetVarInteger(CHARACTER_Player, "LeftJail", _check)
AND
DB_JailBoolean(_check)
THEN
Stuff


I've never used the set/getVars, so I'm not sure if that could work.