Part 6: Other event methods
SetFireCollapse(bool inActive)
This is used to set whether buildings on fire can collapse.
fireCollapseState = true; game.SetFireCollapse(fireCollapseState);
SetGodEvents(bool inActive)
This is used to switch god events on or off (presumably including benevolences). For example, this code is used in the tutorials, so that god events do not get in the way.
bool bGahds = false; game.SetGodEvents(bGahds);
SetPlagueEvents(bool inActive)
This is used to switch health events on or off. Used in the Arretium tutorial, thus:
bool bHealth = false; game.SetPlagueEvents(bHealth);
SetRomeStandardRate(bool inPlebWages, int inAmount)
Used to set the standard wage level for plebs or equites to the specified amount. This can be used as an alternative to the usual random setting of wages, for example to link into the prosperity rating or city funds. Example use:
int nPlebWages = 23; int nEquiteWages = 30; game.SetRomeStandardRate(true, nPlebWages); game.SetRomeStandardRate(false, nEquiteWages);
This code sets the Pleb and Equite standard wages to 23 and 30dn respectively.
SetWeatherActive(bool inActive)
Used to disable or enable weather events - whether scripted or random. Used in the tutorials to prevent events like thunderstorms interfering with progress.
bool bWeather = false; game.SetWeatherActive(bWeather);
DisableEvent(string inEventName)
Not tested but presumably will disable events as listed in the editor. Not clear what string input would be used, but presumably can be found in one of the .dat files. Usage is unclear (there being specific methods for the most likely events: god, weather and health), but would be used in conjunction with EnableEvent. No idea (as yet) what would be valid inputs for the event name.
EnableEvent(string inEventName)
Not tested but presumably will enable events as listed in the editor.
< Previous: Triggered events | Editor Guide | Next: Trade & Empire map >