User Tools

Site Tools


public_scripts:moldsocket

MoldSocket

Movable molds are placed on a socket before they can be used. The socket holds template links that are transfered to the mold when it is placed on the socket. These links are ScriptParams with the data set to the flavor of the real link. The template for a ScriptParams link can be named SP:data (or ~SP:data) and the link data will also be set on the new link. When a mold is frobbed on a socket, the SocketMe message is sent to try using the mold. If the Engine Features\KeyDst property is set on the socket, then the mold must have a matching Engine Features\KeySrc property. Otherwise any mold can be used. The mold will be teleported to the location of the socket plus the COG Offset from the Physics\Model\Attributes property. An Owns link is created from the mold to the socket.

How to Use

The mold socket has ScriptParams links to all the objects that a mold would link to. The link data is the type of link. For the mold lever, set the data to ~ControlDevice. To the FnordLock that also locks the mold lever, the data is Lock. to the FnordLock for the cauldron lever, SP:LockMe. Link to the gauge with the data ~SP:Mold.

Inherits BaseScript
Messages SocketMe, UnsocketMe
Links ScriptParams, Owns
Properties Physics\Model\Attributes, Engine Features\KeySrc, Engine Features\KeyDst
public_scripts/moldsocket.txt · Last modified: 2010/11/22 19:06 (external edit)