Skip to content

60 — Sell building

Sells every structure whose tag is attached to this trigger, through the ordinary deconstruction.

Editor data
Numeric ID
60
Engine ID
TACTION_SELL_ATTACHED
Editor name
Sell building
Need token
NEED_NONE
Parameters
None
Attachment
object
INI example
[Actions]
<TriggerID>=1,60,0,0,0,0,0,0,

The action walks every structure in the scenario and sells each one that clears all of these, in this order:

  1. It is active.
  2. It has been put down on the map.
  3. It is not in limbo.
  4. It carries a tag.
  5. That tag is attached to this trigger.

Each one that clears them is put on the deconstruct mission, which plays the construction animation in reverse and pays RefundPercent of the price back. One firing can therefore sell several separately tagged structures at once.

Two of the refusals a player meets do not apply here. Unsellable=yes is tested by the sell cursor and not by the sale itself. Neither is the sellable field a scenario writes against each structure it places, which reaches only the computer’s decision to sell a building it cannot afford to repair. The refusal that does apply is the missing construction animation, since a type with no buildup artwork cannot be sold by any route, this one included.

A firestorm wall section takes the second branch instead, because it has no buildup artwork of its own. It is removed immediately and returns nothing. The sell cursor offers that removal only while the house’s defense is down; this action makes no such test.

Caveats
  • The action sweeps every structure in the scenario and sells each one whose tag is attached to the same trigger; it is not limited to the structure that sprang it.
  • A structure already deconstructing is passed over, and so is one with a demolition charge counting down on it.
  • Neither the type's own refusal to be sold nor the sellable field on the scenario's structure record is consulted, so both routes that keep a structure out of the player's hands leave this one open.
  • A firestorm wall section is not deconstructed at all. It is taken off the map on the spot, whether or not its house's defense is raised.