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

Lua [BUG?] onStepOut coordinates: position is equal to fromPosition (TFS 1.3)

krafttomten

Well-Known Member
Joined
Jul 23, 2017
Messages
103
Solutions
1
Reaction score
75
Location
Sweden
Hello otland! I'm pretty sure that position.y should NOT be the same as fromPosition.y in onStepOut movement scripts... right? fromPosition should be the tile I leave and position.y should be the tile I (creature) move onto... right?? Or am I missing something?

Lua:
function onStepOut(creature, item, position, fromPosition)
    print(position.y)
    print(fromPosition.y)
end

In my case, [*edit* even when I move on the y-axis], this code outputs
Code:
1486
1486

But this is completely useless! Does anyone know how I can fix it?

*edit Obviously I move the character on the y-axis when testing this....

*edit2 If it matters, here is the movements.xml code

XML:
<movevent event="StepOut" uniqueid="21009" script="emeraldcaves/deob.lua" />

 
Last edited:
It should be same, if you character is changing position in X axis. position and fromPosition may be also same when player login.
 
It should be same, if you character is changing position in X axis. position and fromPosition may be also same when player login.
Yes, but position.x = fromPosition.x and position.y = fromPosition.y should not both be true while moving player around.

This is not true for onStepIn events. For onStepIn events the values change. Is it only for me that onStepOut events are wrong?
 
Back
Top