How would I freeze a players movement in mid-air to allow other players to jump on them and reach a certain point?

Creating a side scroller game where the main concept is to allow players to freeze at any point in the level allowing their fellow coop partners to jump on them. I already have the designs and physics of the characters completed, as well as a few levels. I’m just having trouble creating a blueprint that will allow a player to hold down a specific key and be frozen in place until they release said key. Any tips for this?

there are 2 fixes for that. first off when a event that freezes the character happens, you could register its current location as a variable. so then you would have the location he’s frozen at, and keep setting him at that location at every event tick (with a bool ‘‘IsFrozen?’’ so it doesnt set its location to the variable when its not frozen).

Second less laggy option is to set it to not movable with a node, and set it to movable again when unfrozen. each option should both be only a few blocks of code (very compact) and work.

Using Set custom time dilation, and delta time, to freeze the Player in place, and then return it to normal when you no longer need it frozen…

Hey there,
If you don’t mind I will add something from myself too. I was playing around with this for a bit, but as I’m new to doing stuff in multiplayer it took me a while to get it done. I started by trying to set the gravity scale to 0 and it work somewhat, but in the end I couldn’t wrap my head around. Instead of trying to stop the character mid air I decided to cheat a bit and simply spawn a platform under the character. It can of course be made invisible so it would look real and you would probably have to disable jumping so you can’t do what I did in the video (link below). :slight_smile:
Can’t be sure if this is the right way of doing things, replication is still a new thing for me but maybe with other answers you will have a solid base to start your own thing or improve on what I have.

Here is a [Video][1] showing the end result.

Here is what I did:

  • Created a new Actor Blueprint with a plane static mesh component.
  • Added an arrow component inside my character to get world transform for platform to spawn at.
  • Played around with this code for longer then I should have, just follow the screenshots. If something isn’t clear I will do my best to explain or clarify but it was more of a trial and error for me on this.