Background for Skyrim SE
Member of the ObjectReference script
voidfunctionSetPosition(floatafX, floatafY, floatafZ)Native

Description

Wiki Description

Sets the object's current position in the world.

Documentation Comment

Set the position of the object


Caveats

CK Wiki - Notes

  • 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 Actor.PathToReference(...) or ForceGreet.

Parameters

floatafX

CK Wiki Description

Position along the X axis.

floatafY

CK Wiki Description

Position along the Y axis.

floatafZ

CK Wiki Description

Position along the Z axis.


Examples

; Set the statue to be at the center of the world
StatueProperty.SetPosition(0.0, 0.0, 0.0)

Auto-Generated Example

float myFloat__afX
float myFloat__afY
float myFloat__afZ

myObjectReference__toCallFunctionOn.SetPosition(myFloat__afX, myFloat__afY, myFloat__afZ)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.