pdiddles03 Posted May 3, 2017 Share Posted May 3, 2017 I'm working on a platformer. The biggest part I am trying to figure out right now is how do i attache this sword to him? What is the best method to use for this. Screenshot attached of my game Link to comment Share on other sites More sharing options...
samme Posted May 3, 2017 Share Posted May 3, 2017 sprite.addChild(game.make.sprite(offsetFromSpriteX, offsetFromSpriteY, 'sword'); pdiddles03 1 Link to comment Share on other sites More sharing options...
pdiddles03 Posted May 3, 2017 Author Share Posted May 3, 2017 Thank you! Link to comment Share on other sites More sharing options...
pdiddles03 Posted May 3, 2017 Author Share Posted May 3, 2017 Looking at this further, how do i get the "offsetFromSpriteX" value? Link to comment Share on other sites More sharing options...
samme Posted May 3, 2017 Share Posted May 3, 2017 You choose the offsets, it's just where you want to place the sword relative to the sprite. Probably small numbers like (8, 16). Link to comment Share on other sites More sharing options...
Recommended Posts