user.src Posted May 24, 2016 Share Posted May 24, 2016 Hi there, I've got a strange problem. In my actual project I've got three spritesheets. Everyone works great. But now I can't access any further loaded Spritesheet. I add it like I add all the other spritesheets before. I also tried to add another sprite, but it doesnt work neither. This is one of the testsprites: this is my preload code: this.load.spritesheet('testsprite', './assets/images/testsprite_8x24.png', 8, 24); And this is the way I add/access it: this.testsprite = this.add.sprite(0, 0, 'testsprite'); this.testsprite.frame = 1; Phaser always adds the complete sprite into the scene, not frame 1 though. If I add an animation it doesn't work neither, although testsprite.animations.currentAnim.isPlaying returns true. As I mentioned before in this way I successfully added three other sprites. I can't imagine but: Is there a limit for spritesheets?! Link to comment Share on other sites More sharing options...
ecv Posted May 24, 2016 Share Posted May 24, 2016 Looks like you're specifying the whole spritesheet size in the loader (8x24), instead of each frame's size (8x8). I guess Phaser's playing the animation, but the animation would consist of just one 8x24 frame instead of three 8x8 frames. drhayes and user.src 2 Link to comment Share on other sites More sharing options...
user.src Posted May 24, 2016 Author Share Posted May 24, 2016 Oh s**t! That's it. Maybe I sat to long for the code. Need more breaks Thanks! ecv 1 Link to comment Share on other sites More sharing options...
ecv Posted May 24, 2016 Share Posted May 24, 2016 Hahaha, it happens to everyone Link to comment Share on other sites More sharing options...
Recommended Posts