SetPosition - ObjectReference
Revision as of 21:04, 13 February 2016 by imported>DavidJCobb (→Notes: setmotiontype problem)
Member of: ObjectReference Script
Sets the object's current position in the world.
SyntaxEdit
Function SetPosition(float afX, float afY, float afZ) native
ParametersEdit
- afX: Position along the X axis.
- afY: Position along the Y axis.
- afZ: Position along the Z axis.
Return ValueEdit
None.
ExamplesEdit
; Set the statue to be at the center of the world
StatueProperty.SetPosition(0.0, 0.0, 0.0)
NotesEdit
- SetPosition() should be avoided for placing other actors in sight of the player, as they will suddenly appear in an unrealistic way. Instead, consider placing them nearby but out of sight, and making them approach the player themselves, using PathToReference or ForceGreet.
- All movement functions can cause major issues when used on a reference that has had a motion type override applied.
See AlsoEdit
- GetPositionX - ObjectReference
- GetPositionY - ObjectReference
- GetPositionZ - ObjectReference
- PlaceAtMe - ObjectReference
- MoveTo - ObjectReference
- MoveToInteractionLocation - ObjectReference
- MoveToMyEditorLocation - ObjectReference
- ObjectReference Script
- PathToReference - Actor
- Spatial functions and snippets
- Unit