Cohesion states ?
Posted: Tue May 05, 2020 7:32 pm
Is it possible to assign cohesion states (disrupted, fragmented) to units in the Scenario Editor ?
No, but you can write a script for it in the scenario.bsf file.
Thank you very much ! I will look at your scenario and try to adapt the scripts.Paul59 wrote: ↑Tue May 05, 2020 7:48 pmNo, but you can write a script for it in the scenario.bsf file.
My KYNOSKEPHALAI_197BC scenario has scripts to pinpoint exactly which units I wanted to start Fragmented or Disrupted, but it is often possible to use simpler scripts that affect a whole army or certain unit types.
Hmm:Athos1660 wrote: ↑Tue May 05, 2020 8:10 pmThank you very much ! I will look at your scenario and try to adapt the scripts.Paul59 wrote: ↑Tue May 05, 2020 7:48 pmNo, but you can write a script for it in the scenario.bsf file.
My KYNOSKEPHALAI_197BC scenario has scripts to pinpoint exactly which units I wanted to start Fragmented or Disrupted, but it is often possible to use simpler scripts that affect a whole army or certain unit types.
"Happy those who can script as they will enter FoG2 heaven"![]()
Code: Select all
id = GetUnitOnTile(29,29);
SetAttrib(id, "MoraleState", 2);
SetUnitStatusFlag(id);
SetAttrib(id, "DisplayMoraleState", 2);Code: Select all
id = GetUnitOnTile(29,29);
SetAttrib(id, "MoraleState", 2);
SetAttrib(id, "DisplayMoraleState", 2);
SetUnitStatusFlag(id);Code: Select all
id = GetUnitOnTile(29,29);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);rbodleyscott wrote: ↑Wed May 06, 2020 6:52 amHmm:Athos1660 wrote: ↑Tue May 05, 2020 8:10 pmThank you very much ! I will look at your scenario and try to adapt the scripts.Paul59 wrote: ↑Tue May 05, 2020 7:48 pm
No, but you can write a script for it in the scenario.bsf file.
My KYNOSKEPHALAI_197BC scenario has scripts to pinpoint exactly which units I wanted to start Fragmented or Disrupted, but it is often possible to use simpler scripts that affect a whole army or certain unit types.
"Happy those who can script as they will enter FoG2 heaven"![]()
This code does appear to work in this scenario, but in general it really ought to beCode: Select all
id = GetUnitOnTile(29,29); SetAttrib(id, "MoraleState", 2); SetUnitStatusFlag(id); SetAttrib(id, "DisplayMoraleState", 2);
otherwise the changed morale state won't show until something causes a fresh status update.Code: Select all
id = GetUnitOnTile(29,29); SetAttrib(id, "MoraleState", 2); SetAttrib(id, "DisplayMoraleState", 2); SetUnitStatusFlag(id);
Or, even better
Code: Select all
id = GetUnitOnTile(29,29); SetAttrib(id, "MoraleState", 2); UpdateDisplayMoraleState(id, 2);