• 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!

Linux NPC - walkable

Snavy

Bakasta
Senator
Joined
Apr 1, 2012
Messages
1,249
Solutions
71
Reaction score
621
Location
Hell
It turns out that my previous solution for the same problem hasn't worked out that well.. There seem to be more than one or two NPCs that are walkable... so I've decided to read the part of cpp code where it check wether the NPC is walkable or not and I've been thinking if it would be a good choice to hard code that part so that all NPCs are non-walkable because It seems to be bad idea to open every .xml file and add walkalbe="0"...

LINE 205 npc.cpp
Q: Is it a good idea to hardcode line 206 ? 'walkable = 0'
Code:
    if(readXMLString(root, "walkable", strValue))
       walkable = booleanString(strValue);

to :

Code:
    if(readXMLString(root, "walkable", strValue))
       walkable = 0;
 
It turns out that my previous solution for the same problem hasn't worked out that well.. There seem to be more than one or two NPCs that are walkable... so I've decided to read the part of cpp code where it check wether the NPC is walkable or not and I've been thinking if it would be a good choice to hard code that part so that all NPCs are non-walkable because It seems to be bad idea to open every .xml file and add walkalbe="0"...

LINE 205 npc.cpp
Q: Is it a good idea to hardcode line 206 ? 'walkable = 0'
Code:
    if(readXMLString(root, "walkable", strValue))
       walkable = booleanString(strValue);

to :

Code:
    if(readXMLString(root, "walkable", strValue))
       walkable = 0;

If you don't wanna be able to use change it sure, just use false insted of 0.
0 is not a boolean value, true and false are.

And there isn't any reason to keep the readXMLString in that case either, tbh not anything xD just default it to false in the header file.
 
Hello,

The walkable option no longer exists anywhere in CPP's.
Can you adapt for the summons to stay that way? I need any monster to go through the summons, I got the players through, but the monsters do not.
 
Back
Top