silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,480
- Solutions
- 9
- Reaction score
- 212
Hello, I'm trying make the monsters walk back to the spawn positiion when the target list is empty
I'm using the function from @Marcelo Druida
AS BASE to try move the monsters
then in monster.cpp
void onThink()
the try print TEST works but the TEST 2 don't
I'm using the function from @Marcelo Druida
Code:
https://otland.net/threads/creature-moveto-position.237960/
then in monster.cpp
void onThink()
Code:
} else if (targetList.empty() && randomSteping) {
std::cout << "TEST" << std::endl;
FindPathParams fpp;
fpp.minTargetDist = masterPos.x;
fpp.maxTargetDist = masterPos.y;
fpp.fullPathSearch = true;
fpp.clearSight = true;
fpp.maxSearchDist = 150;
std::forward_list<Direction> dirList;
if (getPathTo(masterPos, dirList, fpp)) {
hasFollowPath = true;
startAutoWalk(dirList);
std::cout << "TEST 2" << std::endl;
}
}
Last edited: