• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Ignore creatures when using getPathTo

mackerel

Well-Known Member
Joined
Apr 26, 2017
Messages
398
Solutions
18
Reaction score
72
I need help with getPathTo function. Not sure if it's possible but I want to ignore any creatures along the way. I.e. when you click your mouse in client on specific position it will go there. It checks for obstacles on your way such as walls, creatures, etc.

My question is, how do you execute this function and ignore the creatures, meaning it will go through them anyway. Do you need to edit sources or is it possible in Lua?

My drawing to demonstrate how it should work

1587007098155.png
 
// creature:move(tile[, flags = 0])

FLAG_IGNOREBLOCKCREATURE

Nice! Would it be possible to retrieve its values though into a variable?? instead of moving creature instantly??

For example, we have

PlayerPosition = 1000, 1000, 7
DestinationPosition = 1005, 1007, 7

If we were to execute getPathTo, it would return table with each direction as to where the character should go (such as 1, 3, 4, 8..). I want something like this, info about your next move, it can even be different format such as Position(x, y, z) - it does not have to be next direction. This is where I am stuck :(
 
Back
Top