Timer / Menu dont pause - Zeitmesser / Menü soll nicht pausieren

I create an "action" which plays an animation every minute. This timer should run for the hole game. My problem is menus pause this timer, but i create 2 important scenes (multiple-choice-test) as menu. Is there a way to deactivate this pause-function or do you have other ideas?

Newbie

56 Posts

I don't understand why it would pause it. Do the animations that are being played belong to an interface? If they do then it's likely that the interfaces are just being hidden when you change to a menu type scene. Try going into the properties of the relevant interface & enabling the "show interface permanently" option. Also check the main settings for your game & see if you happen to have the "auto hide interfaces in menu" option enabled as that hides interfaces automatically whenever a menu scene is shown. Turn that off. Alternatively you can use Lua to toggle if interfaces should be auto hidden in menu type scenes with this line of code...

Imperator

6779 Posts

Sry, maybe you missunderstand the word "action". I dont mean an interface action. Look at the first picture. I would like to create an operation / command-chain (? I dont know the correct word) working like a timer or a clock. And I defined 2 gamescreen (second picture) as menus but of course the timer paused on this screens and it shouldnt.

Newbie

56 Posts

Ah you mean the called by other action gets cancelled when you change to the menu type scene? A looping action block would have been a much better idea - less action parts required all around.

If I were to create a timer with action parts I would do something like this...

pause 60000msset value "timer_schoolclock" + 1jump to action part #1

How you are handling the images/animations is another matter entirely. You could have 60 images/objects with the timer_schoolclock value linked to them so that it shows the correct object/image based on the current value, or you could use an animation & force it to play a specific animation frame based on the current value or if it's more of a traditional clock then you could even rotate the hand(s) with Lua script if you really wanted to. So many possibilities.

Maybe Lua would be a better solution as you can have it always work in the background.

Imperator

6779 Posts

But thats not my real problem. Even the animation thing is working. The only problem is the timer paused in that menu type scenes. Its proceeds after changing back to the normal scene. I think because the game time stops.

So, my possible questions are:- Is there a way that the game time proceeds even in menu type scenes?or if not:- Is there an easy way to change the menu type scenes to a normal game scenes without having a lot of work?

Newbie

56 Posts

Don't think you can change them. You could create a new scene as a regular scene & then copy/paste all of the scene objects, scene actions, conditions & values into it.

I've just messed around seeing if I could create a 12 hour clock based on system time in a menu scene & I also added the digital time underneath which I update using a looping action block in a menu scene. I don't understand why the action block should just stop working because you change to a menu type scene. Are you willing to share some screenshots or a video of how you have set up this time system thing & anything else that is relevant to it?

Imperator

6779 Posts

Pic 1: This is my timer. It is started by another action (act_introduction) at the end of an intro. The clock switchs to 8:55. Now the player has 10min to solve the game.

Pic 2: Here you can see the animation part. The "reset_clockanimation" is only my workaround to be sure that animations not overlapping each other (its long time ago using VS, in my memory thats necessary). Every animation is simply a single frame graphic (as you can see in pic 6) playing until it is stopped (reset_clockanimations). Ignore "anim_tickingclock" its only a test animation.

Pic 3: Clicking on this sheet starts some actions. At the end its changing to the menu type scene "01_sheetpage1".

Pic 4: Thats the menu type scene. The game inventory is hidden (seeable in pic 7). On that scene the timer is paused (because its only running on the classroom scene and not everywhere?). I tested it by using a stop watch. When you go back to the "01_classroom" scene the timer procceds.Example: 50 sec has been passed (clock shows 8:55) . You click on that sheet and change to the sheet scene. Waiting here maybe 30 sec. So realtime 80sec has been passed. You go back to the classroom. The clock show still 8:55 and not as expected 8:56. But after waiting 10 sec the clock shows 8:56.

Pic 5: To be sure the clock has the correct animation frame there is an action (check_clockanimations) everytime you change back to the classroom scene. Works fine.

I'm not sure about this, but wouldn't it be sufficient to copy the start_timer action into the menu scene, where this copy would edit the values of the other scene?One question would be if this copied timer stops automatically when you leave the menu, otherwise you would have to make some query to stop it on leaving and, if the original timer doesnt't kick in again automatically, starting that one again.I have no clue if this would work, but I think it's worth to give it a shot

I tried to put "start_timer" in a menu type scene or in an interface. Its allways the same.

My only idea is to change the count from 60sec-steps to 1sec-steps ( a little more work). So I allways could stops the time counter in the old scene and restart it immediately in the new scene when changing between scenes. Than the loss of time is not so high like restarting it in 60sec-steps. Maybe thats what AFRLme trys to explain me