The docs state:
event
There is also a read-only
event
variable.In the
update
,interact
,collect
,confirm
, andcancel
events, it will have itsdx
anddy
members set to -1, 0, or 1 reflecting the Player’s most recent attempted movement direction along each axis, as well as itstx
andty
members set to the room coordinates of the target tile.
This isn't strictly true. If you use goto
to move the player within a room then dx
and dy
can have values other than -1, 0 or 1 in the update
event.
For example if the player is at 22,10 and then you call goto 13,4
then event.dx
has a value of -9 and event.dy
has a value of -6.
This tripped me up as I was assuming the behaviour from the docs.
The behaviour with exits is for event.dx and event.dy to report the direction the player was facing when they stepped into the exit. This is what makes me think the goto behaviour is possibly a bug?