Forum rules - please read before posting.

Changing / loading a scene creates another instance of the player character

I use actions for my intro scenes and menu options to go to a new scene to start the game or if I load a new scene through load - for example - and this creates another instance of the player character.

Have I set my main character up wrong somehow?

Thanks,

Kris

Comments

  • This seems to be caused by changing the scenes.If I load a scene or room and then do a load from there it's fine but if I go from a menu or use a hotspot to change the scene it creates a clone of my player!

    Nightmare!
  • Please elaborate.  Have you assigned your Player character as the Player prefab in the Settings Manager?  Are you allowing Player-switching?

    I'm also not clear on what you mean by a "load from there" - as in restoring a save game?
  • I had this too when I first started using AC. I forget what the solution was but it happened twice - once when I first tested scene switching and again when I started making my own game.

    It's something I did wrong I'm pretty certain because I remember finding the fix. Sorry I can't state what that fix was, I'm just  draw attention to it seeming less like a bug and more a user error :)
  • Unless you need to make use of an "override" Player object in a particular scene, always keep your Player prefab out of the scene itself when saving in the editor - AC will load it into the scene automatically for you at runtime.
  • I don't think it was that which caused it. I will have a look for my old scene/project files because I think I might have the problem saved from a while back.
  • edited January 2015
    What if I need to override a player object from an scene?
    Setting  the player  in the settings to none doesn't seem to be working, AC keeps making a second instance of the player character when switching scenes
  • Please explain your set-up more clearly.  By override, I'm assuming that you already have a player prefab assigned in your Settings Manager.

    If you enter a scene in which there is already a Player, the "default" one defined in Settings will be removed until you leave the scene.
  • This was not working with my 1.40 for some reason. AC was still instatiated the default one in Settings and ignoring the prefab on Scene. Updated to 1.41 and it fixed. 
    May have been we messed up some file. 
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.