Sorry, it seems I'm
asking for help with Y. Let me provide some background. Let's say we have a script with an objective that the player moves a character to some region (or whatever objectives your random script may have). I inform the player about this objective using a historic_event. How do I remind the player of the objective after this? I could use a hotkey (and in fact this is what I have been doing for years) but there are some obvious problems with this. First, anyone with a non-English keyboard is going to have trouble using the hotkey. Second, players tend to forget the hotkeys even if they're listed in the F12 list. Third, if the script objective has a timer, I will need to script this in for each objective which, despite being scripting 101, is still quite unwieldy and wastes resources.
Instead, how about I use a mission? Everyone already knows how to check mission objectives and the timer is set up right there (can use MissionFinished or LeaderMissionFailed to check if timer expires). All I need is a mission type that 1) can be created using create_mission, 2) can be expired via script (e.g. by killing the target), and 3) can't be completed normally, that is to say, the player can't finish the mission before the script and then have their script objectives disappear.
The obvious candidates for suitable mission types are assassination missions. The problem is condition #3 above, how to prevent the player (or any AI factions) from interacting with the assassination target? What I've done to address this is spawn the target character into a settlement. This puts him "in hiding". Then I use the mission parameter that you've kindly supplied: expire_on_hide_disabled. Now, there is no way to complete the mission normally meaning that only fulfilling the script conditions (as specified in the mission description) can end the mission (with kill_character, campaign_wait 0.1, clear_messages). Even if the settlement the target is hiding in changes ownership, the target remains hiding there and the mission continues. I can even do missions in sequence using the other parameter you supplied: link_mission_id. A few cosmetic modifications make the illusion complete: an invisible strat model for the target general and name corresponding to the region of interest for the script so the mission location finder makes sense.
One interesting thing I discovered along the way is that if you destroy the BG unit for the target general, you can still create the assassination mission but there will be no Target line in the mission scroll. At the start of the next turn the mission will expire due to target death.