# Realtime pokémon multiplayer game; Sprite won't load after reloading scene

**URL:** <https://phaser.discourse.group/t/realtime-pokemon-multiplayer-game-sprite-wont-load-after-reloading-scene/4899>\
**Category:** Phaser 3\
**Created:** [January 15, 2020, 9:03pm UTC](https://phaser.discourse.group/t/realtime-pokemon-multiplayer-game-sprite-wont-load-after-reloading-scene/4899 "2020-01-15T21:03:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaron5670](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/aaron5670/32/2634_2.png) [@aaron5670](https://phaser.discourse.group/u/aaron5670)\
**Post date:** [January 15, 2020, 9:03pm UTC](https://phaser.discourse.group/t/realtime-pokemon-multiplayer-game-sprite-wont-load-after-reloading-scene/4899/1 "2020-01-15T21:03:09Z")

</div>

I’m a beginner and created a simple realtime Pokémon game with Phaser 3 and [Colyseus.io](http://Colyseus.io).

[https://raw.githubusercontent.com/aaron5670/PokeMMO-Online-Realtime-Multiplayer-Game/master/docs/images/PokeMMO.gif(image larger than 4096KB)](https://raw.githubusercontent.com/aaron5670/PokeMMO-Online-Realtime-Multiplayer-Game/master/docs/images/PokeMMO.gif)

But I have a small bug with loading sprites when the scene is reloaded (with new data).

I created a GitHub repository with the source code and a small example of the bug.  
See [GitHub repository](https://github.com/aaron5670/PokeMMO-Online-Realtime-Multiplayer-Game).

I’ve been with this problem for three days and can’t fix this… 🙁  
I really hope someone can help me with this.  
Any help is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![ldd](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@ldd](https://phaser.discourse.group/u/ldd)\
**Post date:** [January 17, 2020, 8:07pm UTC](https://phaser.discourse.group/t/realtime-pokemon-multiplayer-game-sprite-wont-load-after-reloading-scene/4899/2 "2020-01-17T20:07:06Z")

</div>

in [Scene2.js lines 119-120](https://github.com/aaron5670/PokeMMO-Online-Realtime-Multiplayer-Game/blob/master/client/src/Scene2.js#L119-L120),

```javascript
if (data.event === 'PLAYER_CHANGED_MAP') {
// ...code here
}

```

Your x and y from data are wrong. If you try with, say, `x:100` and `y:1100` you’ll see the other dude show up.

So fix how you are sending those coordinates.  
ps:

- you’ll need to disappear the entity once it leaves the current zone too

Good luck!
