User Tools

Site Tools


public_scripts:linktemplate

LinkTemplate

Manipulates links. The object parameter identifies the source that the links will be added to or removed from. Template links are created from the script object to destinations. When turned on, identical links will be made using the source object instead of the script object. Turning off the trap removes the links and sets them on the script object again. Flavor and dest can be set to restrict which links to use. When a link is created, the template link is removed. Links that are removed when the trap is turned off have a duplicate re-made as a template. The parameter on_create will not delete the template links when a new one is created. Off_destroy deletes links without creating links on the script object. Creating multiple links of the same flavor can be avoided by setting the singleton parameter.

Inherits BaseTrap
Parameters object (object) Object that links will be created from.
flavor (string) Type of link to move.
dest (object) Destination of the links.
on_create (boolean) Just make the new links, don’t destroy the template links.
off_destroy (boolean) Only delete links when turned off.
singleton (boolean) Only allow one of the link type to be made from the object.
public_scripts/linktemplate.txt · Last modified: 2010/11/22 19:06 (external edit)