Download

Hard time understanding level startup

Hi guys

Got a little problem here.

If I

  • create a simple project based on side scroller template.
  • Remove SideScrollerCharacter from world outliner.
  • From the blueprints folder, re-add the SideScrollerCharacter to the world
  • start the game

Now instead of the game starting where I added the new SideScrollerCharacter, it magically creates a second SideScrollerCharacter where my editor camera is at the time I press play. I can even see the character that I added in the level (in addition to this magically created one), but it doesn’t do anything.

I have the same exact problem when I try to create a project from scratch and then setup the camera. It seems I just can’t do it. The game always starts from some random place and with a camera that shouldn’t even exist.

I’ve played around with game mode, default pawn class, player controller, player camera manager and who knows what, but nothing seems to work.
I’m clearly missing something trivial. Like a setting somewhere to the tune of: “use this camera instance as default camera”. Is there such a setting?

The one time I managed to use the camera I wanted was when I forced the usage of that camera with blueprints. But even then there were other cameras created in the world outliner and I just “hacked my way” around it.

Any help would be appreciated!

If I understand your problem, it is a similar one we’ve ran into. We ended up making a character with no gravity or interaction and calling it nonselected. Then we set our default pawn to nonselected and on game start, spawned the character we wanted and possessed with controller 0.

Hmh. Well the most simple way to describe the problem really is that stock side scroller template.
If I create a project based on that template and remove the character. What is the correct way to add it back to the scene so that it works.

In single player we use the Spawn Actor node followed by Possess with Get Player Controller [0] plugged into it. For all other players, Create Player with a player index plugged in.

I’m NOT saying this is the right way, or the Unreal way. This is just how we eventually got it to work.