detach
Details
Kode wheel segment | Objects/Attachment |
Style | Specialised |
Modifiers | to inventory /from socket |
Primarily WHEN/DO | DO |
Pre-made brains that use it | Unknown |
Objects >Attachment > detach
Description
This tile allows you to detach one object to another. When an object is attached you can detach it using this tile. Detaching an object that is not attached will have no effect. Objects will fall to the floor if set to tumbling, or will remain in the air if set to fixed.
Example Code
WHEN [once] DO [detach][IWP: sword][from socket][back side]
Modifiers
to inventory: This modifier will detach the object, and instead of it falling to the floor it will appear to vanish from the world. It will instead be added to the owner’s inventory set.
from socket: Paired with a socket name. This will detach an object from a specified socket, such as left hand, head. You do not need to specify the object if you wish all objects from that socket to be detached.
Other Uses
I use this tile for my vehicle driving kode. I attach the player to the vehicle and make them invisible and turn their brain off. The vehicle controls are then turned on and you can drive around. When the player exits the vehicle they are detached from the vehicle and brain and visibility turned on.