To do this, I've made a PrisonEscape faction, that is friendly to the player (they won't attack you, since you freed them) and enemy to the respective Guard faction of their Hold. The problem now is that the guards kill the prisoner before they've even tried to escape.
So, I want to write a script that adds the PrisonEscape faction to the prisoner, only after their cell is opened, to simulate the guards reacting to an attempted prison break. How do I do that, and what script should I use? I'm a noob when it comes to scripting, and would be very grateful for the help.