ParameterTypeDescriptionDefault value
drop_on_alertintegerminimum AI alert level to cause drop0 (ignore alert)
inert_until_droppedbooleanwhether to be FrobInert while carriedfalse
off_when_droppedbooleanwhether to turn off the object when droppedfalse

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:

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:

If 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.)

This script is part of the KDScript module. Copyright © 2012–2013 Kevin Daughtridge. See introduction for details.