Updated Trainer Scripts (markdown)

ghoulslash 2021-02-21 08:54:13 -07:00
parent 6afef3ad90
commit 84f4a1d81d
1 changed files with 1 additions and 1 deletions

@ -217,7 +217,7 @@ Rather than make a new object event template field, we can use the fact that `.t
Here's a brief run-down of the important fields:
* `Script`: the script you want the object to run upon approaching the player.
* `Trainer Type:` the flag that allows the script to run. This must be >3, although you wouldn't want to use a temporary flag anyway. When the flag in this field is set, the object won't approach you anymore.
* `Trainer Type:` the flag that allows the script to run. This must be >3. The `ObjectEvent` structure `trainerType` field is only `u8`. You could expand this to `u16`, but that takes up saveblock space (4 more bytes due to alignment per object event, so 64 more saveblock bytes). Alternatively, just use a flag with ID <= 0xFF.
* `Sight Radius:` the same as for regular trainers
**Note:** there are two bytes free at the end of ObjectEventTemplate. You could easily add the trainer script flag here (don't forget to change the porymap json, GetObjectEventTrainerSightFlagByObjectEventId, and global.fieldmap.h!), and keep the trainer type field as intended.