Forum rules - please read before posting.

All Player Prefabs spawning on Scene 0

edited August 2020 in Technical Q&A

Hello everyone,

I just updated to AC to the current version (1.71.8) and I also updated Unity to 2020.1.0f1. I'm encountering a weird bug in which all of the possible Player Prefabs spawn in on the first scene (Scene 0 in build settings) where my title screen is. Check it out here:

https://www.loom.com/share/b1b04a6c5f2d4e8ba9de350833de6815

This does not occur in any other scene curiously. Any ideas? Is there something I'm missing with the new player switching mechanics and whatnot? Any help is appreciated. Thanks!

EDIT: in the video, I say that Player 0 does not spawn in Scene 0, this is not true. The Player 0 does indeed spawn in the scene in question, and it's located at the PlayerStart Marker (out of view). I apologize for not being clear in the video. I simply meant that, it spawns in this scene along with all other player prefabs. I dunno why I said it the way I did.

Comments

  • What version of AC were you previously using?

    In v1.71.0, the player-switching system was overhauled to make it much more intuitive and easier to use - though it does mean changes have to be made to your project. The exact changes are covered in the Changelog file.

    In short: AC will now keep track of which scene each of your Players are in, and spawn/remove them from scenes automatically. And inactive Players behave like NPCs - no more need to manually swap them with separate NPCs.

    This means, however, that you need to define exactly where each non-default Player begins the game from - which you can do by clicking the cog menu beside their name and choosing Edit start data...

    A tutorial and video on this new workflow is covered here.

  • Thanks Chris! Much appreciated. Yeah, I was using a a AC 1.70 version.

    My player switching is not so much as having multiple players to go between on the fly, it's more like player-switching at specific moments. Like when you get a diver's suit, I just created a second player with new animations, and when you enter the water it switches to that player. And then you control a little octopus, it switches to that player. Maybe it is the same thing.

    I appreciated you pointing out that cog. I'll have to play around with it. No doubt I can figure out the nuances of this new player switching tool. I totally overlooked that cog! Thanks again.

  • If the other Player prefabs are stand-ins for the same character, just have them all start in a "dummy" scene that you never visit in-game.

    The Player: Switch Action still has a Replace old Player's position? option, which you can use to swap one for another - followed by a Player: Teleport inactive Action to move the old Player to the dummy scene.

  • Hey Chris! I didn't see your last message. Much appreciated. That's a great idea about the dummy scene. I actually got this one sorted, but I think your idea is even better. Thanks!

  • I get that controlling multiple characters that way is an interesting solution for some people, but I would wish to have the option to use the old version of the switch player feature. :'(

  • Welcome to the community, @olikante.

    The overhaul was necessary to fix stability issues as well as the ability to move characters between scenes.

    What issue are you trying to solve that's difficult with the current system?

  • I understand... No, issue. I just needed to rework a lot of stuff :D . I am switching a lot of players, but they are the same character in the game. With the old setup, I was just faster with exchanging them. All good, thanks for an AMAZING tool.

  • So this is more a case of changing the character's "costume"? It's worth mentioning that you can still opt to have the new Player take the old Player's position within the "Player: Switch" Action.

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.