Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Belohlavek

/><br />
<br />
Sprites<br />
<img src=http://pastebin.com/9wdQDbb3

Animation works wrong, it outputs wrong movements, idle movement works wrong and black lines appear eventually on canvas. Also, the player spawns as shown on the image. What can I do?

Thank for reading.

1 decade ago by dominic

this.addAnim( 'idledown', 0.1, [41.42] );

Your idledown animation specified one animation frame at the 41.42 tile. You probably wanted 41,42 - comma, not point.

Also I think all your animation frames are off by one. The numbering starts at 0, not at 1. See the Animations article. So you really wanted 40,41

This should work:
this.addAnim( 'up', .21, [20,21,22,23] );
this.addAnim( 'down', .21, [35,36,37,38] );
this.addAnim( 'left', .21, [45,46,47,48] );
this.addAnim( 'right', .21, [5,6,7,8] );
this.addAnim( 'idleup', 0.1, [25,26] );
this.addAnim( 'idledown', 0.1, [40,41] );
this.addAnim( 'idleleft', 0.1, [12,13] );
this.addAnim( 'idleright', 0.1, [10,11] );
Page 1 of 1
« first « previous next › last »