I am working on a long term solo project. A semi-linear campaign, relatively modern historical period, man-to-man, squad tactics type of RPG. I’m new to the field in general, learning as I go, which is why this is a long term project. Originally I had intended the battlefield game play to be turn based, having had much of the game’s mechanics planned out (but not yet implemented) based on that intention. When I first started checking out UE4, The Advanced Turn Based Tactical Toolkit Blueprint looked like it would have been handy as a good starting point.
However, I have recently realized that a real time with (active) pause system (RTWP), using queued orders, would work better for accomplishing the look and feel of game play I am trying to achieve. Unfortunately, there doesn’t seem to be much in the way of documentation or advice out there for implementing such a game mechanic in UE4 (or using any other game engine for that matter). I have seen a few posts regarding getting the camera working while the game is in pause mode, setting player actors to be tick-able when paused, as well telling character components (capsules and skeletons) not to tick (so they are frozen while the camera is allowed to move), but I haven’t seen much more than that.
Honestly, I’m not sure how good all that old and limited advice I’ve seen on the subject is. Using the UMG (Unreal Motion Graphics UI Designer) to help implement this type of mechanic has been mentioned (though without specifics), as well as using Player Controller and HUD Classes (also without specifics). All of which leaves me a little baffled as to which route to take. I don’t see this type of RTWP mechanic in games very often (though it is certainly used sometimes - if not always successfully), so specifics on how to implement such a system, especially using UE4, are understandably scarce.
If I have a hard enough time implementing RTWP, returning my design to a purely turn based mechanic is possible at this stage of development, but it is not a preferred option. I know there is definitely some forum member interest in implementing this type of mechanic for a few game designs, so some useful knowledge on the subject must be out there. I am hopeful that this forum’s community can shed more light on the issue for me - especially regarding specifics of implementation with Blueprints. Any advice on the subject, or just simply being pointed in the right direction, would be much appreciated. Thank you.
Regarding the pausing, you should do that by changing the Custom Time Dilation on the actors you want to pause, instead of tickable-while-paused. The latter is limited in functionality (the tooltip on the setting even says so) and will not work for what you’re trying to do.
But honestly, based on some of the things you said (and the way you said them) it seems like you are not very familiar with the basics of UE4, so I’m not sure that trying to tackle a more advanced topic like active pause and queued orders is a good idea right now. I would suggest you go through several tutorials even if they aren’t related to the type of game you are trying to make. It might sound like a waste of time, but you need to fully understand the core concepts of the engine before you can tackle more advanced functionality.
So, the Custom Time Dilation would be on the actors? Set to zero? Rather than Global Time Dilation? Does this Custom Time Dilation have to be done individually per actor, or can it be done universally for all actors at once? (I assume it probably can be. I just don’t know how yet.) My understanding is that zero never is actually quite zero when it comes to Time Dilation in UE4, or am I wrong on that? Regardless of being right or wrong on that, does it matter in achieving the desired result anyway? (I’ve read some people express concerns about this, but it doesn’t appear to be an actual issue as far as I can tell.) If actor Custom Time Dilation is set to zero, does any other Time Dilation have to be changed to a larger than default setting because of that? (I’ve read some people make mention of this, but they are usually aiming to create an unusual time distortion effect which I am not trying to do.)
Active pause and queued orders are core game play elements that I will have to tackle sooner rather than later. Developing an understanding of how that stuff works (and how it will impact other game design elements) seems like a rather important thing for me to start wrapping my head around now. Sure, I certainly don’t fully understand these things at the moment (in fact, I still barely understand some of them at all), but that is why I ask these questions. You can bet I’ll be asking even more questions about other things later. The answers will help direct me to the right tutorials I need, so I can move on to the other stuff that is also certainly import, but that I am just less worried about - at least for the moment. Pure real time and turn based game mechanics tend to be much better covered with specifics in tutorials, and through other sources of information, compared to real time with active pause game mechanics. I can’t help but ask questions that help fill in the blanks of what I am seeing and reading elsewhere.
I am slowly learning my way around UE4, Blueprints, Blender and so on, while continuing research and development on my game design, all while working a part-time day job, raising a family, etc. It is a lot to take on at once. Completion of the game will certainly take a few years at this rate. That doesn’t bother me. It is a hobby as much as it is anything else. I think about it all the time - when I have a few spare moments to think about anything at all. I like learning about this stuff. It is a joy to finally get around to actually using some of what I’ve learned - even though I still know I have a long way to go.
Thank you for your help pointing me in the right direction.
Global Time Dilation cannot be set to zero. Custom Time Dilation is a setting at the Actor level, so it’s there on everything in the game and can be set to zero.
To set it on everything, you’d want to GetAllActorsOfClass -> ForEachLoop -> Set CustomTimeDilation 0. The brute-force version is to pick Actor as the class filter in GetAllActorsOfClass, but ideally later on you’d want to perhaps do multiple GetAllActorsOfClass loops like this but only on the classes you absolutely need to pause. For example, there’s no point in pausing your static meshes.
After that, on the Completed output of the ForEachLoop, simply set the Custom Time Dilation of the actors you do not want to pause back to 1. This would be things like your Player Controller, whatever actor is holding your camera, etc. This is easier and simpler than checking for and skipping non-pausable actors during the ForEach loop, and you won’t be able to tell the difference because it will all be executed in one frame unless you have a huge number of actors in your map.
Very cool. Just the sort of specifics I was looking for, especially regarding methods that will run a little more efficiently. There can be so many ways to go about doing something. It is nice know more than one way, but also know which is more suitable for a particular purpose, and why that may be the case. And now for my next question…
Ha, Ha. Just kidding. I want to go try this out for myself now and see how it works in action. Thank you.