• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Npc walking on Furniture

carre

Advanced OT User
Joined
Apr 23, 2013
Messages
885
Solutions
1
Reaction score
161
Location
Sweden
Hello otland!

My npc walking on furniture like boxes/chest/table etc.

How can I stop it?
PywLPz8unPz8unPz8unPz9nPw.png

My server is tfs 0.3.7
 
Solution
X
Or use the invisible object that literally blocks anything and everything. xP
1548
those tables are walkable, you need to either edit the otb to make those ids block creatures or use a non-walkable id like a stone altar like you have in the front
 
You can put some stone or any unwalkable item of size that this table would cover and put it underneath.
 
You can script it in
Code:
void Npc::onCreatureMove(Creature* creature, const Tile* newTile, const Position& newPos,
                         const Tile* oldTile, const Position& oldPos, bool teleport)
if there is a table item then tile height(elevation) is > 0, construct tile from position and check if the height is more than 0, and it should do the trick. No idea tho, if its gonna cancel the move if you return the function, didnt try, just a guess.
 
You can script it in
Code:
void Npc::onCreatureMove(Creature* creature, const Tile* newTile, const Position& newPos,
                         const Tile* oldTile, const Position& oldPos, bool teleport)
if there is a table item then tile height(elevation) is > 0, construct tile from position and check if the height is more than 0, and it should do the trick. No idea tho, if its gonna cancel the move if you return the function, didnt try, just a guess.
where to put?
in creaturescripts?
 
Back
Top