Difference between revisions of "SetPos"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Omzy
imported>JOG
Line 5: Line 5:


Changes the object's world-position along the specified axis (x, y, z). Position is a float.
Changes the object's world-position along the specified axis (x, y, z). Position is a float.
Setting this value via computations does not work. Instead, use GetPos with computations and use the result as a variable for SetPos.
'''This does not work:'''
<pre>SetPos X (GetPos X + 40)</pre>
'''This works:'''
<pre>short xPos
Set xPos to (GetPos X + 40)
SetPos X xPos</pre>


[[Category: Functions]]
[[Category: Functions]]
[[Category: Movement Functions]]
[[Category: Movement Functions]]

Revision as of 11:11, 13 June 2006

Syntax:

SetPos axis, pos 

Example:

SetPos y, 100.56 

Changes the object's world-position along the specified axis (x, y, z). Position is a float.