13 lines
613 B
Plaintext
13 lines
613 B
Plaintext
Scriptname _00E_PlayerhousingCurrentOTranslation extends ReferenceAlias
|
|
|
|
GlobalVariable Property continueTranslateToPlayerLoop Auto
|
|
|
|
Event onLoad()
|
|
;loop needs to be extracted from the rest of the code due to performance reasons (don't know why exactely, but defining new functions slows this down dramatically)
|
|
Actor player = Game.getPlayer()
|
|
while continueTranslateToPlayerLoop.getValue()
|
|
getRef().TranslateTo(player.getPositionX() + 100 * Math.sin(player.getAngleZ()), player.getPositionY() + 100 * Math.cos(player.getAngleZ()), player.getPositionZ(), 0, 0, player.getAngleZ(), 5000)
|
|
Endwhile
|
|
Endevent
|
|
|