PlaceAtNode - ObjectReference

Member of: ObjectReference Script

Makes X new references of the passed in form, optionally forcing them to persist, and places them at the position of the given node in our object's 3D, returning the last one it created. If abAttach is true, the newly created ref is also attached to the calling one.

SyntaxEdit

ObjectReference Function PlaceAtNode(string asNodeName, Form akFormToPlace, int aiCount = 1,
   bool abForcePersist = false, bool abInitiallyDisabled = false, bool abDeleteWhenAble = true, bool abAttach = false) native

ParametersEdit

  • asNodeName: Node in our 3D to create references at
  • akFormToPlace: The base form to create references of.
    • Note: the akFormToPlace can be things such as MiscObject, ActorBase, etc...
  • aiCount: How many references to make at once.
    • Default: 1
    • Caution: Only the last reference created is returned.
  • abForcePersist: True to force the created reference to be persistent.
    • Default: False
  • abInitiallyDisabled: True to force the reference to be initially disabled
    • Default False
  • abDeleteWhenAble: True to force the reference to be deleted as soon as it is no longer persisted by a property or quest and is no longer in the loaded area.
    • Default True
  • abAttach: True to cause the newly created reference to be attached to the calling one as if its Attach Ref had been set in the editor
    • Default False

Return ValueEdit

The last ObjectReference that was created. Or None if no references could be created for some reason.

ExamplesEdit

; Place a bird in a tree at a critter marker
ObjectReference newbird = TreeRef.PlaceAtNode("CritterPerch00", BirdBase)

See AlsoEdit