Page 1 of 1
How Do You Delay Support in a Scenario
Posted: Tue Dec 10, 2013 10:14 pm
by Navaronegun
All,
Reposting this from the Modder's Corner to reach a wider audience.
I have card settings I am utilizing as a baseline in a Campaign. How do I specifically use support at a predtermined point in the scenario. Lets say naval support arrives on turn 10 or air support is available on turn 10. How do I script that without altering the cards?
Nav
Re: How Do You Delay Support in a Scenario
Posted: Tue Dec 10, 2013 11:47 pm
by pipfromslitherine
I was sure that someone would respond

. Do you mean you want to delay the ability for the user to use a bonus, or that you want to cause a bonus to happen at a given point in the game?
Cheers
Pip
Re: How Do You Delay Support in a Scenario
Posted: Wed Dec 11, 2013 12:09 am
by Navaronegun
pipfromslitherine wrote:I was sure that someone would respond

. Do you mean you want to delay the ability for the user to use a bonus, or that you want to cause a bonus to happen at a given point in the game?
Cheers
Pip
Delay the ability for use until a specific point in the scenario. Dawn, essentially in this case, but allow use from that point forward.
Nav
Re: How Do You Delay Support in a Scenario
Posted: Wed Dec 11, 2013 12:23 am
by pipfromslitherine
You would need to look at the specific bonus you want to affect, but you can just reset the cooldown each turn using SetScriptGlobal I would think.
Cheers
Pip
Re: How Do You Delay Support in a Scenario
Posted: Wed Dec 11, 2013 12:27 am
by Navaronegun
pipfromslitherine wrote:You would need to look at the specific bonus you want to affect, but you can just reset the cooldown each turn using SetScriptGlobal I would think.
Cheers
Pip
Well, I tried that, but that just reset the cooldown rate. It was still available on turn 1.
Nav
Re: How Do You Delay Support in a Scenario
Posted: Wed Dec 11, 2013 2:29 am
by AndrewGardner
You can call SetScriptGlobal("25pdrBattery", "gCounter", -6) for example on turn 0 to delay availability of an artillery bonus or air strike.
To figure out the number to set, subtract the number of turns you want to delay from the DELAY stat for that bonus in cards.txt.
Note this technique wouldn't work on a bonus assigned to both sides (ex Revive), you could add a function to the bonus in that case and call it using CallBonusFunction.
Re: How Do You Delay Support in a Scenario
Posted: Wed Dec 11, 2013 2:40 am
by Navaronegun
Thanks, Andrew. So in the example above, if the card was set at delay 6, and I gave it the above value, it would be available on turn 12?