Action codes move the narrative forward through events like a door knocking or phone ringing, keeping the story exciting while providing needed details. Enigma codes present puzzles or riddles to the audience, causing them to question what will happen next and enticing them to continue watching to find the answers, helping advance the narrative. Both action and enigma codes engage audiences by resolving events or mysteries through continued viewing.