nb0yc33 Posted October 28, 2017 Share Posted October 28, 2017 I don't know what's wrong with this function - it produces an invalid left-hand side error. Please note bombs is a group so I want this function to run whenever the user's x and y coordinates are similar to any of the sprites in the bombs group. It'd be great if anyone could help bombTimerCountdown: function() { if (user.body.x = bombs.body.x || user.body.x = bombs.body.x-10 || user.body.x =bombs.body.x+10){ if (user.y = bombs.body.y || user.y = bombs.body.y-10 || user.y = bombs.body.y+10) { bombs.kill(); user.kill(); this.game.state.start(game.state.current); } } }, Link to comment Share on other sites More sharing options...
samme Posted October 28, 2017 Share Posted October 28, 2017 (user.body.x === bombs.body.x || user.body.x === (bombs.body.x - 10) || user.body.x === (bombs.body.x + 10)) Link to comment Share on other sites More sharing options...
Recommended Posts