Adding bonus or object during play?

Download scenarios and talk about scenario design.

Moderators: Slitherine Core, BA Moderators

Post Reply
louism
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Fri Apr 06, 2012 12:10 pm

Adding bonus or object during play?

Post by louism »

Is it possible to add or remove a bonus during play (ex: removing artillery bonus after a side lose an observation point)
If so, what is the script command or the script mechanics?
Maybe there is something to be done with SetBonusBaseValue(name, side, value)? I must admit that I do not understand how that command is supposed to work...


Same thing for objects. Is it possible to place or remove an object on the map during play (ex: to randomize the position of some objects during the prebattle setup)? If yes, what is the script command?

I read the STUB_Engine_docs and searched the forum for that topics and could not find it. I also cannot recall any scenario that does it. I am not very optimistic on that one...

Thanks.
pipfromslitherine
Site Admin
Site Admin
Posts: 9929
Joined: Wed Mar 23, 2005 10:35 pm

Re: Adding bonus or object during play?

Post by pipfromslitherine »

Check out the Merr random map scenarios. They contain code by Merr and Amaris that does exactly what you are thinking about - there are a number of functions for programatically adding tiles or objects. Link below.

To turn on and off bonuses, you would need to tweak the bonus script in your own campaign and have it check a flag (using either Get/SetScriptGlobal or using a universal variable) to determine whether to show or disable the onscreen icon.

The most up to date script command documentation can always be found in the My Documents/My Games/BBCBA/AUTODOCS folder in the BattleScript.txt file. This is generated by the game and is thus always up to date.

viewtopic.php?f=105&t=28686

Cheers

Pip
louism
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Fri Apr 06, 2012 12:10 pm

Re: Adding bonus or object during play?

Post by louism »

Thanks about the AUTODOCS tip!
There are new (?) commands that do exactly what I needed (PlaceObject, DeleteObject)
Post Reply

Return to “Battle Academy : Scenario Design”