Part 5: Triggered events

TriggerDisasterEffect(int inType)
This can be used to trigger a one-off disaster. Example use:

  int mEarthquake = IDMaker.FromString("Short earthquake");
  game.TriggerDisasterEffect(mEarthquake);

TriggerFireDamage(int inBuildingType, int inNumBuildingsAffected, int inAmountOfDamage)
This can be used to set a number of buildings of the specified type on fire. Example use - sets two luxury markets on fire, 80% damage:

  int mIDLuxury = IDMaker.FromString("C4b Market Luxury");
  game.TriggerFireDamage(mIDLuxury, 2, 80);

See Part 10 for a list of building IDs that can be used.

TriggerStructureDamage(int inBuildingType, int inNumBuildingsAffected, int inAmountOfDamage)
This can be used to cause structural damage to a number of buildings of the specified type on fire. Example use - 90% damage to the forum:

  int mIDForum = IDMaker.FromString("C4b service Forum");
  game.TriggerStructureDamage(mIDForum, 1, 90);

See Part 10 for a list of building IDs that can be used.

TriggerWeatherEffect(int inName)
This can be used to trigger a one-off weather event such as a blizzard, thunderstorm or sandstorm. Example use:

  int mSandStorm = IDMaker.FromString("SANDSTORM");
  game.TriggerWeatherEffect(mSandStorm);

< Previous: UI Controls | Editor Guide | Next: Other event methods >