• 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 0.4)Monster behavior problems

farore

Active Member
Joined
Mar 2, 2009
Messages
74
Reaction score
26
Running a TFS 0.4, 7.7 downgraded to 7.4.
When for example a rat has low health and is running away, with each step it takes it "looks back" at the player then it turns around again and walks 1 step, turns around, walks 1 step and so on.
Anyone got any idea of what might cause this?
 
Running a TFS 0.4, 7.7 downgraded to 7.4.
When for example a rat has low health and is running away, with each step it takes it "looks back" at the player then it turns around again and walks 1 step, turns around, walks 1 step and so on.
Anyone got any idea of what might cause this?
What is it's run distance in the monster file?
 
What is it's run distance in the monster file?
Sorry, where do I find that exactly?

The monster turns around for a fraction of a second facing the direction of the player then keeps running, it does this when it's 1 sqm and on all other sqms when it's running away until it walks off screen.
 
Sorry, where do I find that exactly?

The monster turns around for a fraction of a second facing the direction of the player then keeps running, it does this when it's 1 sqm and on all other sqms when it's running away until it walks off screen.
Oh, then it's most likely not an issue within the lua files.
I had thought the run distance was set to 4 or something. xP

(you can find a myriad of controls for monsters in their respective monster file.)
(data/monsters/rat.xml)
(data/monsters/rodents/rat.xml)
-- idk tha exact directory. xD
 
Oh, then it's most likely not an issue within the lua files.
I had thought the run distance was set to 4 or something. xP

(you can find a myriad of controls for monsters in their respective monster file.)
(data/monsters/rat.xml)
(data/monsters/rodents/rat.xml)
-- idk tha exact directory. xD
Aha okay, no I'm pretty sure it's something in the src files.
Thanks though :)
 
This issue seems similar to the TFS 1.x problem: Solved - Weird monster behaviour in TFS 1.1?
However, without seeing your source it will be hard to tell where exactly your problem could be.
I suggest to somehow link us the creature.cpp files or entire repo if it's not a secret (highest chance the problem sits there)
 
This issue seems similar to the TFS 1.x problem: Solved - Weird monster behaviour in TFS 1.1?
However, without seeing your source it will be hard to tell where exactly your problem could be.
I suggest to somehow link us the creature.cpp files or entire repo if it's not a secret (highest chance the problem sits there)

Thanks for the input! Here's the monster and creature files.
 

Attachments

Change line 675 in creature.cpp
from this
Code:
            isUpdatingPath = true;
to this
Code:
            isUpdatingPath = false;
If that doesn't help, problem is more complex and requires few hours to solve.
 
Back
Top