Ok here goes,
Lets setup a simple example.
Scenario one has 3 units for player one. At the end of the scenario this means, player one can have between 1-3 units.
Scenario 1
At the end of this scenario, we activate a series of triggers to find out how many units player one has got.
Trigger 1
Condition: Own objects player 1 = 3
Effect: Activate trigger = 4
Effect: deactivate trigger 2
Effect: deactivate trigger 3
Trigger 2
Condition: Own objects player 1 = 2
Effect: Activate trigger = 5
Effect: deactivate trigger 1
Effect: deactivate trigger 3
Trigger 3
Condition: Own objects player 1 = 1
Effect: Activate trigger = 6
Effect: deactivate trigger 1
Effect: deactivate trigger 2
Trigger 4
Display as objective, (Your code for the next level is 103)
Condition: anything that can’t be achieved
Trigger 5
Display as objective, (Your code for the next level is 102)
Condition: anything that can’t be achieved
Trigger 6
Display as objective, (Your code for the next level is 101)
Condition: anything that can’t be achieved
At the end of the scenario, you activate the trigger 1, 2 & 3. This displays a code in your objectives screen. The player is instructed to write down this code. Then at the start of the next scenario this code is entered. For the next scenario you will need an Ai with the taunts set up, and the corresponding triggers to remove the units that were lost in the first scenario.
Scenario 2
Start by displaying instructions to the player, asking them to enter the code they were given in the last scenario. You start with all the units, that scenario one had, but have them for another player. Then remove those that didn’t make it, and change the owner to player 1 for those that did.
Trigger 1
Condition: Ai signal 101
Effect: Remove object (two of the units)
Effect: Change ownership (The units to player 1)
Effect: Deactivate trigger 2
Effect: Deactivate trigger 3
Trigger 2
Condition: Ai signal 102
Effect: Remove object (one of the units)
Effect: Change ownership (The units to player 1)
Effect: Deactivate trigger 1
Effect: Deactivate trigger 3
Trigger 3
Condition: Ai signal 103
Effect: Change ownership (The units to player 1)
Effect: Deactivate trigger 1
Effect: Deactivate trigger 2
(No need to remove any units, cus they all made it)
Then in your Ai have this
(defrule
(taunt-detected 1 101)
=>
(acknowledge-taunt 1 101)
(set-signal 101)
(disable-self)
)(defrule
(taunt-detected 1 102)
=>
(acknowledge-taunt 1 102)
(set-signal 102)
(disable-self)
)(defrule
(taunt-detected 1 103)
=>
(acknowledge-taunt 1 103)
(set-signal 103)
(disable-self)
)
There are other systems you could use, but this gives the basic idea.
This is how the information is passed from one scenario to another, now you can also do this for upgrades, resources or anything else. But the more things you try to transfer from scenario to scenario, the more complicated the process gets. One word of warning, if you try to transfer for example, up to 10 units, and up to 1000 gold (to the nearest 50), you quickly realize, you don’t have enough taunts (Max 256) This is because there are hundreds of combinations, so using more than one code becomes necessary. And the ai/trigger work becomes a nightmare! (Or heaven, if your like me, I love triggers )
Anyway, hope that’s explained it, and not got you more confused and you thought Ana’s posts were long