kriket Posted October 27, 2015 Share Posted October 27, 2015 I have uploaded it to http://castle9.site44.com/ and would appreciate it if you can check the source files in browser developer tools as I am at work and uploading all the stuff to a host to use in codepen takes a lot more time. Anyways, code is very simple. There are two doors and when the player touches the door1 at bottom, he should be placed at door2 at top. Simple. But its not happening and no errors. this.door1.body.collides(this.playerCollisionGroup, this.door1leads, this); door1leads: function(){// a.sprite.x = 900;// this.player.position = this.door2.position; // this.player.position.x = this.door2.position.x;// this.player.position.y = this.door2.position.y; this.player.x = this.door2.x; this.player.y = this.door2.y;// this.player.y = 100; console.log("hi"); }, nothing works really. Pls help Link to comment Share on other sites More sharing options...
Skeptron Posted October 27, 2015 Share Posted October 27, 2015 Try to set this.player.body.x and this.player.body.y instead? kriket 1 Link to comment Share on other sites More sharing options...
kriket Posted October 27, 2015 Author Share Posted October 27, 2015 Thanks a lot, skeptron! Link to comment Share on other sites More sharing options...
Recommended Posts