Background for Fallout 4
Member of the ObjectReference script
ObjectReferencefunctionAttachWire(ObjectReferenceakRef, Formspline=NONE)Native

Description

Wiki Description

Attaches a BendableSpline base object between to other references.

Documentation Comment

Attachs a BendableSpline to two other references
Restrictions:

  • akRef must not be None
  • akRef must not be the same as the caller (i.e. no wire to itself)
  • Spline must be a BendableSpline (None will use FormID 0001D971)
  • Calling object must be linked to a Workshop (Uses keyword 00054BA6)
  • Calling object must not be another BendableSpline (i.e. no wire to wire)
    Returns the newly created wire ref (The wire ref is disabled)

Caveats

CK Wiki - Notes

  • The ref this is called on must linked to a workshop using the keyword WorkshopItemKeyword (FormID 00054BA6). All objects placed in workshop mode are linked to the workshop using this keyword. The calling ref must also not be another BendableSpline.
  • When created, the new ref is disabled, so you must enable it yourself. For convenience you can use ObjectReference.CreateWire(...) instead.

Parameters

  1. ObjectReferenceakRef

    CK Wiki Description

    Must not be None and must also not be the same as the caller (i.e. no wire to itself).

  2. Formspline=NONE

    CK Wiki Description

    Must be a BendableSpline object. If None is passed, it will use the default workshop wire (FormID 0001D971).


Examples

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

Auto-Generated Example

ObjectReference myObjectReference__akRef
Form myForm__spline

ObjectReference returnedValue = myObjectReference__toCallFunctionOn.AttachWire(myObjectReference__akRef, myForm__spline)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.