| Parameter | Type | Description | Default value |
|---|---|---|---|
drop_on_alert | integer | minimum AI alert level to cause drop | 0 (ignore alert) |
inert_until_dropped | boolean | whether to be FrobInert while carried | false |
off_when_dropped | boolean | whether to turn off the object when dropped | false |
KDCarried manages physical objects that are carried or worn by AIs, but are dropped when appropriate. Objects with this script should be linked to an AI having the KDCarrier script in one of the following ways:
inert_until_dropped parameter is true and thus the object cannot be pickpocketed, the pickable pocket count will be reduced by one.)When triggered, this script will remove any links between its object and the AI and cause the object to drop (deadfall). It responds to the following triggers:
Drop messageCarrierBrainDead message from KDCarrier (sent when the carrier AI is killed or knocked out)CarrierSlain message from KDCarrier (sent when the carrier AI is slain under certain other circumstances)CarrierAlerted message from KDCarrier (sent when the carrier AI is alerted), if the drop_on_alert parameter on this object is greater than 0 but less than or equal to the AI's new alert levelIf the inert_until_dropped parameter is true, this script will add the FrobInert metaproperty to its object on Sim (or Create for dynamically created objects) and remove it when the object is dropped.
If the off_when_dropped parameter is true, when this script drops the object it will send the TurnOff message to the object itself and along any ControlDevice links from the object.
If the object is non-physical, it will be given an appropriate physics model before it drops. In T2 (TMA), if the object is in an invalid position (because e.g. the AI fell partially into a wall), the script will not allow it to drop. (inert_until_dropped and off_when_dropped will still be respected.)