Mod:Creation Kit/AttachWire - ObjectReference

F4SE Member of: Mod:Creation Kit/ObjectReference Script

Attaches a BendableSpline base object between to other references.

Syntax
ObjectReference Function AttachWire(ObjectReference akRef, Form akSpline = None) Native

Parameters

 * akRef: Must not be None and must also not be the same as the caller (i.e. no wire to itself).
 * akSpline: Must be a BendableSpline object. If None is passed, it will use the default workshop wire (FormID 0001D971).

Return Value

 * The newly created wire ref in a disabled state, or None if no wire was attached.

Examples
ObjectReference wireRef = RadioTowerTop.AttachWire(RadioTowerAnchor, MetalCableSpline) wireRef.Enable
 * Attach a metal cable wire between the top of a radio tower to one of it's anchor points.
 * Enable the wire so we can see it.