Difference between revisions of "MoveTo - ObjectReference"

m
imported>JustinOther
imported>JustinOther
Line 31: Line 31:
Bob.MoveTo(BobsHouseMarker)
Bob.MoveTo(BobsHouseMarker)
</source>
</source>
 
<br/>
 
<source lang="papyrus">
<source lang="papyrus">
; Moves a portal 120 units in front of the player, 35 units under their height
; Move Bob to his house, but don't match the rotation of the marker
Portal.MoveTo(Game.GetPlayer(), 120 * Math.Sin(Game.GetPlayer().GetAngleZ()), 120 * Math.Cos(Game.GetPlayer().GetAngleZ()), Game.GetPlayer()GetHeight() - 35)
Bob.MoveTo(BobsHouseMarker, abMatchRotation = false)
</source>
</source>
<br/>
<br/>
<source lang="papyrus">
<source lang="papyrus">
; Move Bob to his house, but don't match the rotation of the marker
; Moves a portal 120 units in front of the player, 35 units under their height
Bob.MoveTo(BobsHouseMarker, abMatchRotation = false)
Portal.MoveTo(Game.GetPlayer(), 120 * Math.Sin(Game.GetPlayer().GetAngleZ()), 120 * Math.Cos(Game.GetPlayer().GetAngleZ()), Game.GetPlayer()GetHeight() - 35)
</source>
</source>


Anonymous user