Forum rules - please read before posting.

Switching scenes

Hi everyone,

Still having a blast, still a noob. I'm building multiple rooms for my 2D game and even though I'm successful in making the characters walk, talk, and interact with their surroundings, I have a problem that seems so basic that I can't believe I haven't found an answer to it yet. I've worked my way through the manual, checked all the tutorial videos and searched the forum... and I'm really starting to feel like an idiot here :-)

Switching from one room to the next is no biggy. I created a hotspot that makes the scene switch to a different one. But I haven't figured out how I can store the progress of my player character between the scenes. How can I have him carry inventory items between scenes, and have dialogues in scene X trigger options in scene Y?

Again, these seem like problems on such a basic level that I'm sure there's a ton of information somewhere, I just keep missing it. Sorry if I'm asking questions to which the answers have already been provided.

Still really enthusiastic about the system! Having a great time exploring and building.

Joost.

Comments

  • There are a number of ways to track progress, some of which would include variables and logic to check what's what...

     However I think what you are after is something to save the states of change in scenes when they take place. This is done by adding the appropriate "remember" script to the gameobjects which change. Bear in mind that by gameobject I also mean things like conversations. There are specific scripts for different types of changing gameobject.

    You should note that this is needed for player saves too so if they save and load up again the changed states of gameobjects are saved too. In fact the section of the manual to deal with this is: 

    9.0 - SAVING AND LOADING
  • Hi Xidore,

    Thank you for your answer. However, I'm still not fully understanding the system. What I'm looking for is a way to toggle a conversation option in scene x after finishing a line of dialogue in line y. I can toggle options within scenes, of course, but I keep failing to toggle them across scenes. I've tried to drag conversations into the prefab folder, but that doesn't seem to work. What am I doing wrong?

    All the best,

    Joost.
  • I may be wrong (I haven't done much with conversations like you describe yet in my game) but I think you might want to have conversation choices change the results of GLOBAL variables. Then you can check this/these variable states in any conversation object in any scene (GLOBAL variables are accessible in any scene).

    As I say there may be a different logical method to keeping track of conversations of which I am not aware but this is how I would do it myself in the absence of seeing another method.
  • Currently it's not possible to affect the dialogue options in another scene directly, but @Xidore's suggestion is the correct way to get around this for now.
  • Hi Xidore and Chris,

    Thanks again for your input. I've been trying to crack the variables issue and I've gotten a bit further this time. I've managed to change a Global Variable with a dialogue option in Scene X (big triumph), but now I'm stuck on enabling a dialogue option in Scene Y. I can't add an action to the dialogue options, only components.

    Thanks a million for your kind help!

    J.
  • UPDATE:

    I think I've cracked it, but I have one question: at first I tried the "OnVarChange" option to get the dialogue option to toggle, which didn't work. Then I added it to the cutscene on start, and then it did work (really happy with that). Am I doing this correctly or am I missing a step?

    J.
  • The "OnVarChange" is more of a helper than anything - and you wouldn't need it here because the variable, when changed, affects something in another scene anyway.

    It doesn't need to be in the OnStart cutscene, but before you call Dialogue: Run conversation insert a Variable: Check Action.  If the Variable is now the value you want (e.g. True), then use a Dialogue: Toggle option Action to enable the correct dialogue option.  If you later want to disable this option, you can disable it forever with the same Action - meaning subsequent calls to re-enable it will be ignored.

    When dealing with "check" Actions like this, it's recommeded to use the ActionList Editor window, as it makes the logic much easier to read and edit.


  • Thanks a million, Chris! Adventure Creator is great. Having so much fun figuring all this out.

    All the best, J.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.