How to stop player walk animation for cutscene?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

How to stop player walk animation for cutscene?

Postby Henry Hittinggold » Sat Apr 03, 2021 8:02 am

I'm currently toying around with a cutscene that triggers on item pickup and then is supposed to freeze the player and show him from the outside by changing the camera. While I was able to technically freeze the player with Thing_Stop(playerTid) and SetPlayerProperty(playerTid, TRUE, PROP_TOTALLYFROZEN), I noticed that the actor is still playing its walk animation continuously. This, of course, looks rather goofy. Is there a way to stop the walk animation without swapping the player with a dummy actor?
Henry Hittinggold
 

Re: How to stop player walk animation for cutscene?

Postby Nigel Drapperwater » Sat Apr 03, 2021 8:41 am

You could try using SetActorState:
https://zdoom.org/wiki/SetActorState
Just set the player's state to Spawn and it should work, I think.
Nigel Drapperwater
 

Re: How to stop player walk animation for cutscene?

Postby Deathmatcher » Sat Apr 03, 2021 9:19 am

This works like a charm! Thank you. (Forgot to login when posting the question, hence the Henry Hittinggold alias)
User avatar
Deathmatcher
 
Joined: 11 Dec 2003


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests