Difference between revisions of "AttachWire - ObjectReference"
m
no edit summary
imported>Qazaaq (added f4se member) |
imported>JBURGESS m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''F4SE Member of:''' [[ObjectReference Script]] | '''F4SE Member of:''' [[ObjectReference Script]] | ||
{{Template:Papyrus:RequiredF4SE|version=0.3.2}} | {{Template:Papyrus:RequiredF4SE|version=0.3.2}} | ||
Attaches a [[BendableSpline|BendableSpline]] base object between to other references. | |||
== Syntax == | == Syntax == | ||
Line 11: | Line 10: | ||
== Parameters == | == Parameters == | ||
*akRef: | *akRef: Must not be None and must also not be the same as the caller (i.e. no wire to itself). | ||
*akSpline: | *akSpline: Must be a BendableSpline object. If None is passed, it will use the default workshop wire (FormID 0001D971). | ||
== Return Value == | == Return Value == | ||
* | *The newly created wire ref in a disabled state, or None if no wire was attached. | ||
== Examples == | == Examples == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; | ; 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() | |||
</source> | </source> | ||
== 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 [[CreateWire - ObjectReference|CreateWire]] instead. | |||
== See Also == | == See Also == | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] | ||
*[[CreateWire - ObjectReference]] | |||
*[[GetConnectedObjects - ObjectReference]] | |||