TranslateToRef - ObjectReference: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
imported>Threedee
(Removed this from the Console Category because this is not a console command.)
m (Convert source tags to syntaxhighlight)
 
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Function TranslateToRef(ObjectReference arTarget, float afSpeed, float afMaxRotationSpeed = 0.0)
Function TranslateToRef(ObjectReference arTarget, float afSpeed, float afMaxRotationSpeed = 0.0)
TranslateTo(arTarget.X, arTarget.Y, arTarget.Z, arTarget.GetAngleX(), arTarget.GetAngleY(), arTarget.GetAngleZ(), afSpeed, afMaxRotationSpeed)
TranslateTo(arTarget.X, arTarget.Y, arTarget.Z, arTarget.GetAngleX(), arTarget.GetAngleY(), arTarget.GetAngleZ(), afSpeed, afMaxRotationSpeed)
endFunction
endFunction
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 22: Line 22:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Translate the bird ref to the rock with a low speed
; Translate the bird ref to the rock with a low speed
Bird.TranslateToRef(Rock, 1.0)
Bird.TranslateToRef(Rock, 1.0)
</source>
</syntaxhighlight>
<br>
<br>
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Translate the bird ref to the rock with a low speed, and low rotation speed
; Translate the bird ref to the rock with a low speed, and low rotation speed
Bird.TranslateToRef(Rock, 1.0, 10.0)
Bird.TranslateToRef(Rock, 1.0, 10.0)
</source>
</syntaxhighlight>


== Tips ==
== Tips ==

Navigation menu