Announcement

Collapse
No announcement yet.

Pause Game excluding specific class?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pause Game excluding specific class?

    Is it possible to do this?

    I checked the source code and I see that the original Game Pause function actually comes from this:

    Code:
    UWorld* const World = GEngine->GetWorldFromContextObject( WorldContextObject );
    APlayerController* const PC = World->GetFirstPlayerController();
    World->GetAuthGameMode()->SetPause(PC);
    As far as I see, this gets the first Player Controller (which I'm assuming it is the World's controller) and then uses a pointer to the world to set the pause state to the whole world. However, what I want is to pause everything in the world except for a specific class I want to exclude. Is this possible? I've been digging through the code but I couldn't get any answers.

    Thanks in advance for the help.

    #2
    Maybe modify CustomTimeDilation.

    Comment


      #3
      Originally posted by Cube2222 View Post
      Maybe modify CustomTimeDilation.
      But as far as I read, CustomTimeDilation cannot be set to 0 because it breaks some of the game logic the engine uses, so that's out of question.

      EDIT:
      Plus, that wouldn't make much sense, wouldn't it? If I could set Time Dilation to 0, then I would have to set the Custom Time Dilation of the class I want to exclude to infinity.
      Last edited by Keytotruth; 12-16-2014, 09:09 AM.

      Comment


        #4
        If you could set it to 0, you would set all others actors time dilation to 0. Check it out maybe.

        Comment


          #5
          Originally posted by Cube2222 View Post
          If you could set it to 0, you would set all others actors time dilation to 0. Check it out maybe.
          But that's not a solution. In UDK you could set Time Dilation to 0 and all actors would stop, but in UE4 Time Dilation cannot be set to 0. Setting it to 0 just makes time go reeeeally slow, but it's not fully stopped.

          Comment


            #6
            Maybe negative values?

            Comment


              #7
              Originally posted by Cube2222 View Post
              Maybe negative values?
              Using negative values is the same as setting it to 0. The end result is the same. It won't pause the game.

              Comment


                #8
                Here is some reference:
                https://answers.unrealengine.com/que...r-ticking.html
                Just turn off the ticking of all actors except the oens you want to move.

                Comment


                  #9
                  Originally posted by Cube2222 View Post
                  Here is some reference:
                  https://answers.unrealengine.com/que...r-ticking.html
                  Just turn off the ticking of all actors except the oens you want to move.
                  Enabling or disabling ticking doesn't have anything to do with enabling or disabling the rendering of actors. If I disable the ticking of an actor, it just disables the ticking event when the game is paused.

                  I can enable ticking in the class I want, but still, since what I want is to play an animation during pause, the animation won't update just because I play it in the ticking event.
                  Last edited by Keytotruth; 12-16-2014, 06:23 PM.

                  Comment

                  Working...
                  X