Christian981 Posted March 31, 2019 Share Posted March 31, 2019 Hello, I am making a top down zombie shooter in Phaser 3. I am using the moveToObject function to make zombies follow the player. Now I want to make healthbars for the zombies. I have read that you can use containers to make the enemies and healthbars move together but I am having trouble to move the container with moveToObject. Is it possible to move a container with the moveToObject function or should I use something else instead? Quote Link to comment Share on other sites More sharing options...
lifesanrpg Posted April 16, 2019 Share Posted April 16, 2019 Here's how I'm currently doing it: asteroidcontainer = container.add([createAsteroid, miniongraphics]); var tween = this.tweens.add({ targets: [asteroidcontainer], x: Phaser.Math.Between(-400, -100), duration: 5000, yoyo: false, delay: function(i, total, target) { return i * 600; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.