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

1 decade ago by niroop

HI, i have two separate entities with separate animation sheets. how can I change the animation of other entity in this entity's update function?

update: function() {
		var player = EntityPlayer2 )[0];
                if (this.vel.x > 200) {
                   this.currentAnim = this.anims.disappear;
                    // this is where i need player2's run animation
                   player2.currenAnim =;

1 decade ago by dominic

You can access other entities through the Game's .getEntityByName() or .getEntitiesByType() methods.
Page 1 of 1
« first « previous next › last »