ParameterTypeDescriptionDefault value
junk_tool_luggedbooleanwhether to slow down the player while in inventorytrue
junk_tool_dropbooleanwhether to drop the object upon successful usefalse

Unlike other inventory objects, tools (objects that can be used to frob other objects) cannot be given the “Junk” inventory type. KDJunkTool replaces much of this behavior for a tool object. While the tool is in inventory:

The tool object should have the following settings in the Engine Features→FrobInfo property:

World Action
“Move” (To place the tool in inventory when frobbed in the world.)
Inv Action
Tool Action
“Script” (Combined with a script such as StdKey or LockPick, or an A/R stimulus.)

If the junk_tool_lugged parameter is true, the player will be slowed down to 60% of normal speed while holding the tool, and the grunting schemas garlift and gardrop will be played when the tool is picked up and put down, respectively. If the Inventory→Limb Model property is set for the tool, that player carry arm model will also be displayed while the tool is held. This replicates the behavior of the Lugged script (which should not be used along with this script), except that this script handles slaying of the tool correctly. If this parameter is used, the tool's mass should be increased (in the Physics→Model→Attributes property) for realistic throwing/dropping physics.

For key objects (having the StdKey script), a successful use results in the key being slain. This allows various responses to successful use:

remain in inventory
no special setup
be destroyed
set Game→Damage Model→Slay Result property to “Normal”
drop to ground
set junk_tool_drop parameter to true
This script is part of the KDScript module. Copyright © 2012–2013 Kevin Daughtridge. See introduction for details.