Hi guys
Working in a "scifi weapon checkpoint", and I need to rotate player.
This has nothing to do with "FloatPlatform", just want to transport for point A (trigger zone) to point B (a platform)
I'm using "trigger zone" to run my script, and using "TransportToIfUsed(e)", and it does fine, but player comes faceting the wrong angle; in another words, if you positioned looking to the north, so players appears looking to your left, instead of looking to your front.
So I thing being able to RotatePlayer I can bypass the wrong faceting.
Or perhaps there is another one I'm missing here?
And yes, I've tried also:
Quote: "SetFreezePosition(x,y,z)
SetFreezeAngle(x,y,z)
TransportToFreezePosition()"
And those commands goes fine if player is closest to the platform, but this not the case, since platform is the destination point.
I'e tried...
local state = {}
function plr_transport_init(e)
state[e] = "out"
end
function plr_transport_main(e)
PlayerDist = GetPlayerDistance(e)
GetEntityPlayerVisibility(e)
if g_Entity[e]['plrinzone']==1 then
if PlayerDist<150 and g_Entity[e]['plrvisible'] == 1 and state[e] == "out" then
tNewX = g_Entity[10]['x'] -- 10 = platform number (id)
tNewY = g_Entity[10]['y']
tNewZ = g_Entity[10]['z']
PromptDuration("e: " ..e .." tNewX: " ..tNewX .." tNewY: " ..tNewY .." tNewZ: " ..tNewZ,3000)
ResetPosition ( e, tNewX, tNewY, tNewZ )
SetFreezeAngle(g_PlayerAngX,g_PlayerAngY,g_PlayerAngZ)
SetFreezePosition(tNewX, tNewY, tNewZ)
TransportToFreezePosition()
--ActivateIfUsed(e)
--TransportToIfUsed(e)
FreezePlayer()
state[e] = "in"
end
end
end
And I got "nil value" error in line "tNewX = g_Entity[10]['x'] ", looks like GG does not recognize "10" as platform id.
Any idea?
Thanks in avance for all feedbacks
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics