Forum rules - please read before posting.

Making scenes persistent throughout game

Loving AC so far! :) Still learning, but it's definitely helped speed up my game's development.

Anyway, I've searched around the forums and haven't really found anything related to this. What I was wondering was: how would you make a scene in AC persistent throughout the game? 

E.x., player interacts with an NPC in scene 1, and once the dialogue reaches a certain point, the NPC will leave and no longer be accessible. The player will move on to different scenes, but eventually they can go back to scene 1 - where the NPC left.

Now, my problem with this is that the scene will basically reset itself when the player returns to it, and the NPC will be accessible again. Not only that, but the NPC's dialogue will repeat, ignoring any progress the player has made.

Is there any way to keep scenes persistent throughout the game? Hopefully I'm not missing something obvious with this.

Thanks!

Comments

  • edited March 2016
    Global Variables are your friends for this kind of thing - but will obviously also require setting up some logic to deal with them in Action Lists.

    There's a bit about it in section 7 of the manual - unfortunately it's not really talked about that much in the tutorials, as far as I remember.
  • edited March 2016
    Use global variable only if you need to access it from other scenes.
     For example : Talk to NPC quest, then you can access that global variable when you open your quest log in anotehr scene and see if it is checked there.
    Otherwise it is perfectly save to use local variables for simple things like "did something now forget it".

     For simple things I also often use Remember: Visibilty ,Remeber: Transform, Remember: Hotspot components - it works just like a local bool varaible :)

     I can guess in your case you use Hotspot to talk to an NPC add Remember: Hotspot to that hotpsot and in your interaction/cutscene add at the start Hotspot: Enable/Disable and disable .
    Or you can simply remove that Hotspot but dont forget to add Remember: Transform component instead and remove that hotspot in your actionlist.
    Tons of ways, see what fits the best :)
  • Oh yeah - you're right. The described scenario would work fine with local variables.

    I should really learn to think before I type! :O)
  • Awesome, thank you both for the help, I was completely lost haha. I'll check out the suggestions and see what I can do with it, but it definitely sounds like a solution to my problem.
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.