Download

Looking for advice for implementing a real time pausable game mechanic

Hello all,

I’m looking to implement a pause feature in a real time strategy game. The best comparison I can think of is the total war series. You can pause a battle at any time, give orders to your troops (that they will carry out when the game resumes), move the camera around the battlefield, and resume whenever you want.

I don’t think that the built in pause mechanic of UE4 will work as that just freezes everything. I know you can make inputs still function during pause, but I just don’t think that that mechanic was made with this in mind. I also don’t think that time dilation will work as time is still moving even if you make the time dilation as close to zero as possible. I think it may have to be a completely custom made mechanic where I just freeze everything that I want to stop during a “pause” and allow everything else to function as normal. With this in mind, is there a way to temporarily freeze a character movement component? I wouldn’t want to just stop a character and then restart it completely as acceleration would be an issue. Ideally, I’d like the character to retain the knowledge of where he was moving to when the pause occurred and just resume the order when the unpause came… unless of course the order was overridden during the paused time. Anyway, this is just my beginnings of an idea of how to get the real-time pausable mechanic in place, but if anyone else has any better ideas or tips, I’d love to hear them.

Thanks a lot and happy holidays to everyone in the community!

I am pretty sure you could use the UE4 pause for your needs. It just means you need a unit order system that can Q up your move orders while paused.

Since menu systems can remain unpaused then you could similarly isolate other functions as required.

I don’t know the details of how that is accomplished but I am positive you can do it.

You can Set Tickable When Paused any actor you like. So as long as you’ve allowed your controller BP (whatever parses the player inputs into commands for units) to Tick while paused, you should be able to pause the game and allow the player to still interact with it.