why my player become two when i make .tscn autoload?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By potatobanana

why my player become two when i make .gd autoload?

when i put my player in other scene, my player become 2, one at x0 y0, the other one at middle screen.

in player scene my char move to left immediately after i start play scene.

What? Sorry I couldn’t understand what you typed.

SIsilicon | 2019-03-05 14:16

why my player become two when i make player.gd autoload?

when i put my player in other scene(map), my player become 2, one at x0 y0, the other one at middle screen.

in play scene my player become 2 like clone, and both move at same time when i press button to move.

in player scene my char move out to left screen immediately after i start play scene.

sorry for my broken eng.

potatobanana | 2019-03-05 15:38

So what I’m getting is that when you load the map scenes, two instances of player is created. Am I getting that right?

SIsilicon | 2019-03-05 15:43

yeah. that right.

potatobanana | 2019-03-05 17:17

  1. Try using Google translate. Who knows. It might make your sentences more legible.
  2. Maybe you already have a player instance in the saved scene, but then when you start the game, a script makes another instance. Is that your case?

SIsilicon | 2019-03-05 19:02

here my video before and after i make singelton , maybe you can understand
https://youtu.be/87zoWsC_hsY

potatobanana | 2019-03-06 07:24