1 decade ago by Joncom
Quote from ckcollabFor the sake of debugging, have your screen follow the position of the troublesome entity, perhaps.
I&039;m not sure, but it's definitely not visible at #{x: 64, y: -8}
This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact
Quote from ckcollabFor the sake of debugging, have your screen follow the position of the troublesome entity, perhaps.
I&039;m not sure, but it's definitely not visible at #{x: 64, y: -8}
How do I make the "screen follow" an entity/position?
// Like this... ig.game.screen.x = entity.pos.x + entity.size.x/2 - ig.system.width/2; ig.game.screen.y = entity.pos.y + entity.size.y/2 - ig.system.height/2;
Quote from mahgoI could be wrong, but I don't believe hurik has any plans to make the paths more natural. I'm basing this assumption based on the fact that it's be 8 months since the last update.
Did you have an ETA on when you were going to make the paths more natural?
Quote from mahgohurik's plugin already provides the groundwork. You can make some improvements yourself using techniques found here. I believe hurik's pathfinding plugin is the best one publicly available. Or maybe Impact++ has some extra features? I'm not sure...
Yeah seems like a fair assumption!
Any plugins out there that do more than 45 degree paths, and take entity size into account?
https://github.com/hurik/impact-astar-for-entities
https://github.com/hurik/impact-astar-for-entities
update: function() {
console.log("Enemy is: (" + this.pos.x + ", " + this.pos.y + ")");
// Update it every 2 seconds
if(this.pathTimer.delta() > 0) {
// Get the path to the player
this.getPath(ig.game.player.pos.x, ig.game.player.pos.y, true);
this.pathTimer.reset();
}
// Walk the path
this.followPath(this.speed, true);
// Update the animation
this.currentAnim.gotoFrame(this.headingDirection);
// Heading direction values
// 1 4 6
// 2 0 7
// 3 5 8
},