PlaceAtMe - ObjectReference

From the CreationKit Wiki
Revision as of 17:44, 16 December 2011 by imported>Scornett (→‎Syntax)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: ObjectReference Script

Makes X new references of the passed in form, optionally forcing them to persist, and places them at our reference's location, returning the last one it created.

Syntax

ObjectReference Function PlaceAtMe(Form akFormToPlace, int aiCount = 1,
   bool abForcePersist = false, bool abInitiallyDisabled = false) native

Parameters

  • akFormToPlace: The base form to create references of.
    • Note: the akFormToPlace can be things such as MiscObject, Actor, ActorBase...
  • 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

Return Value

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

Examples

; Place a new box at the target marker
ObjectReference newBox = TargetMarker.PlaceAtMe(BoxBase)


; Place a two new boxes at the target marker
ObjectReference oneOfTheBoxes = TargetMarker.PlaceAtMe(BoxBase, 2)

Notes

If you want to place a leveled actor, you probably want PlaceActorAtMe - ObjectReference.

See Also