Hello all,
I've got a slight problem I can't find a solution to, I've checked to see if this has been posted before but can't find exactly what I'm looking for.
Basically in the game I'm working on I have a gallery that unlocks as the play speaks to people and completes parts of the NPCs story.
I've got each NPC Gallery (currently only 3) set up as a seperate menu, each menu contains 6 images, 3 visible at the start of the game (basically blank undiscovered images) and 3 hidden ones. During game play I hide and unhide the menu elements.
Complete the demo and after the credit scene. I use Engine:Endgame ->restart game without reseting menus. And everything works fine.
However, when closing the game down completely and booting it back up. The menu elements are back to their original hidden and visable states.
Perhaps I've gone about setting up a gallery the wrong way, but this is the only way I managed to get it working in a way I want. I tried a journal as that has been suggested in other threads. But I couldn't get that to display and unlock how I wanted it to.
Is the only way to create a variable for each menu element, and have them read on scene load to hide and unhide as and when the player has completed parts of the story, can variables survive the game being totally shut down?
Sorry for the long post, if anyone has advice please let me know. I'm still not great with coding so if coding is needed please dumb it down for me.
Thank you for your time.
Kind Regards
Kal
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Use Variables to keep track of what images been "unlocked", e.g. "Image 1 unlocked", "Image 2 unlocked" etc.
When the Menu turns on, check these variable values to show/hide elements accordingly.
You can then set these Variables "Link to" fields to "Options Data", so that their values exist within the Profile (i.e. alongside volume levelts etc), rather than individual save-files.
Thanks for the fast response Chris, I was afraid that was going to be the only way. In the future there could be upwards of 20 characters each with 3 or more items to unlock.
Just wondering is there any to condense down global variables, I'm still working out how all the variable types work.
But something like.
Variable character X
-> story section 1 = True
-> story section 2 = True
-> story section 3 = False
-> story section 4 = False
Instead of each of the story sections being a variable on their own. Can AC looks up the character variable then can check each story section if it's true or not?
I saw there was a Popup variable but wasn't sure how that works, it seems that I could set multiple fields.
Heck I'm unsure if what I'm asking for is even a thing.
Once again thank you for your fast response, I'll get to creating these variables and setting them to the Options Data.
Just a quick update to say thank you so much Chris, that solution worked like a charm
No problem.
PopUps are useful but can only take one value. It'd be appropriate here if story sections were always completed in order (i.e. 3 can only be true if 1 and 2 are).
Otherwise, be sure to use a trailing slash in your variable names to keep things organised, e.g. Story/Section 1, Story/Section 2
Thanks for the suggestion Chris, that worked great for keeping things organised.