StopAnimation() doesn't help. I had already written a workaround that made the problem disappear (works better in my case than the UnGlitcher()):
if g_InKey == "p" and GetTimer(e)>BtnTime or g_InKey == "P" and GetTimer(e)>BtnTime then
BtnTime = GetTimer(e) + TIME_B
OX = g_PlayerPosX
OY = g_PlayerPosY
OZ = g_PlayerPosZ
UGTimer = GetTimer(e) + 10
TryToFreeze = 1
end
if TryToFreeze == 1 and UGTimer < GetTimer(e) then
if OX == g_PlayerPosX and OY == g_PlayerPosY and OZ == g_PlayerPosZ then
PlayNon3DSound(e,1)
FreezePlayer()
FreezeAI()
HideHuds()
-- Whatever you want to do after freezing goes here
else
PromptDuration("Please stop before pressing P.",500)
TryToFreeze = 0
end
The problem itself seems to be
kind of fixed in the new build BUT only virtually and with an extremely annoying side effect.
First of all, I say "kind of" because the character still actually moves (this can be proven by creating a script that tests distance to player and prompts when player is near it - Now in testplay face character with this script and start moving. Hit p and see the camera stop (animation continues as usual). Wait for a while and a prompt appears. Wait some more and it disappears. Now hit o and voila, you are back in the original positions, but... BUT (now comes the annoying part) screen flashes black and MUSIC RESTARTS.
NOOOoooooOOOO!!! DO NOT WANT!!!
If the player position can now be saved for later use then why not just give us "SetPlayerLocaction(x,y,z)", "FlashScreenBlack()" and "RestartMusic()" functions instead of clumping these together with UnFreezePlayer() to make the game look like a skipping record player?
I made another thread about this immedieately when I noticed the new state of affairs. Sorry for flooding. I didn't remember that I had already started a discussion about this topic here. The other thread is here:
https://forum.game-guru.com/thread/213795