
Originally Posted by
Epistolary Richard
It would depend on whether or not you wanted the player to be able to save either before the script ran or while it was running. If it was something that happened at the very start of the campaign you can use a campaign script.
What you can do is what Myrddraal does with his scripts and that is use a campaign script to start a show_me script. This means that the script starts running at the beginning of a campaign without player involvement, but all the campaign script does is advance the advice thread and simulate the show_me buttons being pressed. So a second into the campaign, the campaign script has finished running and therefore the player can save. After that, the show_me script is in control and the player can save as normal.
The campaign/show_me division solely relates to how the script is initiated. Show_me scripts are then further divided into event scripts and background scripts.
The difference between the two is essentially whether the script is intended to have a single, instantaneous effect on the game (such as creating a unit or giving more money) or whether the script is designed to be constantly running in the background of the game (such as the multiple turns script).
Both rely on the player to activate them, however an event script requires player interaction on each and every occasion it wants to make a change to the game, whereas once a background script has been activated it can make lots of changes to the game without the player's approval or even knowledge.
Generally speaking, it's better to use a background script for anything that involves the AI.
Bookmarks