Jump to content


  • Please log in to reply
Mazing questions
2 replies to this topic - Started By Dominic, Jan 09 2019 06:12 PM

#1 Dominic

Dominic
  • Members
  • 1 posts
  • Pip

Posted 09 January 2019 - 06:12 PM

if i dig holes in the maze path (to fill with water and stop fire elementals will the mobs try to destroy terrain and dig a different way in?

also in one of my previous maps i built a maze that was the only entrance to my base and once it got big half the mobs went a different way and broke through trees and rock is this common if so how do i prevent this? 


  • 0

#2 Tiberiumkyle

Tiberiumkyle
  • Moderators
  • 57 posts
  • Pip

Posted 10 January 2019 - 01:19 AM

Monster pathfinding is based on movement cost. When a monster decides on a route to take, the pathfinding portion of the AI looks at the movement cost of everything between the monster and where it wants to go. Base terrain has the default cost, paths and roads lower movement cost, resources like crystal raise it, as does water (fire elementals refuse to go into it as it harms them) and tar. Forest and mountains have quite high costs, and walls can as well. Gates don't have as high a cost as walls, so will get targeted over walls more often.

A newer addition to this is that each mob that's planned a path through a tile, whether they're actually in it or not, slightly raises the movement cost of that tile, causing them to spread out. You may find yourself needing to go with 2 or even 3 thick walls in some places, depending on all the variables.

 

Water in the maze will keep fire elementals from going through, even if they have to dig through mountains. If using that, you need to leave them a path, or fully cut off all potential routes with water.


  • 0

#3 sSs1897

sSs1897
  • Members
  • 4 posts
  • Pip

Posted 10 January 2019 - 11:50 PM

Also the "where the monster wants to go" part can be sort of any block inside your range. Not confirmed, but monsters do pick random targets. Also, their random spawn point can also influence the path.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users