Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to pause everything except GameInstance?

How can I pause everything in the game except the GameInstance?

This is a mobile game so it also should be a cheap method.

Custom time dilation for each actor is an expensive method but it doesn't work for me because GameMode doesn't get affected from CustomTileDilation variable. I use GetGameMode node and connect it to SetCustomTimeDilation(0) node but it doesn't actually set it.

So, I can pause everything except GameMode and GameInstance but I can't pause GameMode with this method. It probably doesn't implement CustomTimeDilation varibale correctly, it looks like a bug.

Product Version: UE 4.12
more ▼

asked Sep 27 '16 at 02:12 AM in Bug Reports

avatar image

424 15 28 58

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

You can check Tick on Pause in actor I believe. And than use Pause game, not setting time dilation to 0.

more ▼

answered Sep 27 '16 at 01:05 PM

avatar image

539 38 49 68

avatar image SalihBalkan Sep 27 '16 at 01:23 PM

Unfortunately that option does not exist in GameInstance class.

avatar image Yata Sep 27 '16 at 01:48 PM

I am sure GameInstance does not have Tick at all. In our project we "tick" gameinstance form GameState.

avatar image SalihBalkan Sep 27 '16 at 02:35 PM

Yes GameInstance doesn't tick every frame by itself but there are timers inside GameInstance that are ticking.

For example there is a socket connection module inside it. It should send connection validation to server every 5 seconds, fired by a timer. But that timer doesn't fire if I pause the game or set time dilation to 0.

I will try ticking from GameState.

avatar image SalihBalkan Sep 27 '16 at 03:00 PM

I just tried your suggestion. But it didn't work out.

  1. I set GameState as ticking even when paused.

  2. Fired event from GameState every second.

  3. Followed the string printed from GameInstance.

Result: Timer in the GameState stops when I pause the game.

EDIT: I managed to get it fired by using it inside Event Tick. I added WorldTickTime to a float and every time it exceeds 5, I fired the event and works fine now. Thanks for your help! :)

alt text

untitled.jpg (315.9 kB)
(comments are locked)
10|2000 characters needed characters left

Well, there is something like "execute console command" and write there "slomo 0", but I'm not sure about results for game instance.

BTW: Why bug reports?

more ▼

answered Sep 27 '16 at 09:20 AM

avatar image

6 4 5

avatar image SalihBalkan Sep 27 '16 at 12:16 PM

slomo 0 is also pausing GameInstance too.

I was a little bit sleepy last night so I forgot to write the bug. I added it now, thanks for reminding.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question