getdirectiontoface macro

This commit is contained in:
Eduardo Quezada
2024-05-29 15:52:21 -04:00
parent d1e2f620b8
commit 3d05961dd5
3 changed files with 16 additions and 11 deletions

View File

@@ -95,10 +95,7 @@ EventScript_SmashRock:: @ fallthrough
end
EventScript_FollowerFieldMove:
callfunc ScrFunc_GetDirectionToFace
.2byte VAR_0x8005
.byte OBJ_EVENT_ID_FOLLOWER
.byte OBJ_EVENT_ID_PLAYER
getdirectiontoface VAR_0x8005, OBJ_EVENT_ID_FOLLOWER, OBJ_EVENT_ID_PLAYER
specialvar VAR_0x8006, GetPlayerFacingDirection
goto_if_eq VAR_0x8005, DIR_NONE, EventScript_FollowerFieldMoveEnd
@ Swap follower and player