diff options
author | ghoulslash <41651341+ghoulslash@users.noreply.github.com> | 2020-07-09 12:11:08 -0600 |
---|---|---|
committer | ghoulslash <41651341+ghoulslash@users.noreply.github.com> | 2020-07-09 12:11:08 -0600 |
commit | cd703e5a0e294e33aea40ef1cd6b8d24c845945b (patch) | |
tree | c285e92f9a354c69cb5b8c69bf448df2672ffe58 | |
parent | 8a2af668948097f4fd75ac1392f469ce656da5e7 (diff) |
Updated Trainer Scripts (markdown)
-rw-r--r-- | Trainer-Scripts.md | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Trainer-Scripts.md b/Trainer-Scripts.md index 27f197e..161d316 100644 --- a/Trainer-Scripts.md +++ b/Trainer-Scripts.md @@ -154,7 +154,17 @@ static u8 CheckTrainer(u8 objectEventId) } ``` -**3. Create the function `GetObjectEventTrainerSightFlagByObjectEventId`** +**3. Make the trainers only see in 1 direction +Find the function `GetTrainerApproachDistance`. Replace the line: +```c +if (trainerObj->trainerType == TRAINER_TYPE_NORMAL) +``` +with: +```c +if (trainerObj->trainerType == TRAINER_TYPE_NORMAL || trainerObj->trainerType >= TRAINER_TYPE_RUN_SCRIPT) +``` + +**4. Create the function `GetObjectEventTrainerSightFlagByObjectEventId`** First, open [src/event_object_movement.c](../blob/master/src/event_object_movement.c). Somewhere, add the function `GetObjectEventTrainerSightFlagByObjectEventId`: ```c u16 GetObjectEventTrainerSightFlagByObjectEventId(u8 objEventId) |