Update Journal Feature After Cutscenes

Hello,

I’m trying to figure out how to update a journal feature I’ve added after it plays certain cutscenes in my game but can’t figure out how to do it. My game is pretty much complete and this is the last step before I bugtest/package. Basically in the game you the player are supposed to piece together your memory back by going to specific places across an open world to recollect your memory. I’ve added a feature that whenever you press the key ‘J’ it opens up a journal hinting at where the next memory is located at, updating the journal after each recollected memory cutscene.

I’ve set up the journal to open and close with the same key:

The journal also updates about 7 times throughout the game, I’ve split each update into different widgets. Each update has it’s own widget image, for example here’s the first update:

218694-2.png

And the second one:

218695-3.png

And so on…

The problem I’m having is, I’m not sure how to automatically update to the next update widget and remove the previous one. After each cutscene, the trigger box that activates the cutscene gets destroyed and the next memory is set to visible as shown here:

I was thinking of creating an array variable that holds all the widgets and just updates them after each cutscene so when the player presses J, the next hint is available to them - almost like a quest tracker. This is the last thing I have to do so if anyone can help me out I’d really appreciate it!

Also, I’m a graduating senior at college and this is my thesis project which will be presented in an art gallery. I’d like to reset the game after a certain time of inactivity but also not sure how to do this. I’ve tried researching and came across this solution: https://www.reddit.com/r/unrealengine/comments/675bn5/how_to_have_game_reset_itself_after_x_minutes_of/

But I’m not sure how I would create something like this. I’m still pretty new to the coding side of UE4.

Thanks!

I’d like to reset the game after a
certain time of inactivity but also
not sure how to do this.

Have a look at the very last answer here, it should work reasonably well as inactivity detection. It monitors mouse movement and/or key presses, starts/resets countdown whenever it detects player action and fires an event once the countdown completes.

The journal also updates about 7 times
throughout the game, I’ve split each
update into different widgets. Each
update has it’s own widget image, for
example here’s the first update

Are you saying that you are actually using 7 separate widgets for this? As in, you have 7 nearly identical blueprints? If the only thing that makes them different is the image they display, I’d use 1 widget blueprint and instantiate it.

Prep:

  • create an array with the objective incomplete images
  • create an array with the objective complete images

In the widget:

  • create an image variable that will hold the objective completed image
  • make sure that the ImageWidget has Expose on Spawn ticked
  • create a variable that will hold the objective complete image and Expose on Spawn as well
  • set the widget root visibility to Hidden

At the beginning of the game:

  • create all 7 widgets in a loop, feed them images from the arrays in Prep
  • add the newly spawned widgets to the vertical box in the journal, show the 1st one
  • have an int variable tracker telling you which objective you’re at, set it to 0 as default

When you complete the 1st objective:

  • use the tracker to get the index from the vertical box container that holds your widgets (or from the widget array)
  • swap the image for the completed one
  • update the int index tracker by adding 1, use it to get the index from the vertical box container that holds your widgets (or from the widget array)

Somehow I think I managed to make it sound complicated. But this can be put together in 10 minutes or less.

To be perfectly honest, if you only have 7 of them and never plan to grow this project, it might be easier to do it by hand in the Master Journal widget. Just add 7 custom widgets and update their images on Construct. Keep them in an array to keep the track of the current index.

Thanks for your help! I managed to fix my problems - the only thing I have is when I add the ‘Any Key’ node for the reset, the rest of my movement keys don’t work. Other than that everything is running smoothly.

Hey, glad to hear you got it to work.

[…]when I add the ‘Any Key’ node for
the reset, the rest of my movement
keys don’t work.

Select AnyKey node and untick ConsumeInput in the details panel.

Ah wow, I didn’t even see that, haha. Thanks for your help again! All is working now!