So I think you've got some mistakes in places. DB_CombatCharacters keeps track of which characters are in combat, you do not need to set this manually in the iNIT the shared scripts will do it for you.
One of the main reasons combat doesn't start right is an alignment issue.
I'm not terribly familiar with the dialog editor, is the flag "CombatDialogue" your creation or one of the included flags?
If it's your creation, I think you should do it in this way:
IF
DialogEnded("YOUR DIALOG NAME",_)
AND
ObjectGetFlag(THE NPC INVOLVED,"CombatDialog",1)
THEN
SetFaction(THE NPC INVOLVED,"Evil NPC");
I would set the object flag on the NPC, not the player.
SetFaction() is a shortcut to starting combat, there are more proper ways to do it but I don't think they work straight off with the shared scripts.
Make sure to set your player character to Good NPC as an alignment.
If you have your own alignment file or are using the one from Origins, just adjust the alignments I put above to fit what you are doing.
And with the above script, is the flag is 0, combat won't start.
Last edited by SniperHF; 03/10/17 06:18 AM.