*Looks through Cys_General*
Looking at how the game handles the Tutorial...
IF
CharacterLeftTrigger(_Char,TRIGGER_PlayerCell)
AND
_Char.IsPlayer()
THEN
DB_JailBreak(1);
IF
CharacterSawCharacter(CHARACTER_LUCS_NPC_M_N_ImmaculatePrisonPatrolGuardBase_000,CHARACTER_Player2)
AND
DB_JailBreak(1)
THEN
NOT DB_JailBreak(1);
DialogStartTwoSpeakerDialog("guardcatchkey",CHARACTER_LUCS_NPC_M_N_ImmaculatePrisonPatrolGuardBase_000,CHARACTER_Player2);
If I'm understanding how the tutorial is done, the first IF will make a new database, and then the second IF (your event) will check whether that Database exists.
Sorry for the late reply i had work

That bit of code i actually understand.
I have a good feeling about it. I'll get back to you in 5 minutes

And yeah noel it starts the combat sequence
Back with your alignment suggestion i figured if it doesnt update alignment for neutral or good until the person is attacked or buff i had the idea that maybe when the player leaves the cell it would change the guard to hostile. Thinking that might proc the conversation when the guard sees the player.
Unfortunately combat starts way before the guard sees the player. Making that impossible.
Rhidian suggestion works. with a small change to charactersawcharacter(guard, player) as the player has to come first and not the guard. Its too bad he has eyes in the back of his head though.
I really appreciate the help you two. If either of you need anything please feel free to send me a PM. i'm not the best scripter. But i'm 3d designer.