There is no script based way to change occupation as such without changing the country that a hex belongs to, unless one wants the country itself to surrender and ownership to change that way.
The Territory script is therefore generally the best one to use (one of the Surrender scripts can also be used for this, as mentioned above).
What I would recommend would be to open up the Territory script file for one of the official campaigns, and work through one of them to understand what it sets out to do.
With that done, it'll make answering any questions you have easier, as hopefully you'll have some grasp of it already then.
Judging from the circumstance in which you wish it to happen, the Territory script will need a Decision event to trigger it. This doesn't have to be a real Decision, as if no text is added then it becomes what we call a Dummy Decision, i.e. there is no player choice, but the Decision fires when its trigger conditions are met, and it then triggers your Territory script.
You'll find examples of Dummy Decisions within the official campaigns. Find one, and then look in the other script files to find the script(s) it triggers. These will have that Decision's number in their link= section.
< Message edited by BillRunacre -- 11/8/2018 7:06:47 PM >