I have documented the Osiris API you need to do this at https://docs.larian.game/Osiris/API/CharacterEnableWaypointUsage.

If you are unfamiliar with Osiris, you can have a look at https://docs.larian.game/Osiris for links to overviews and other information. You can also have a look at the tutorial videos for Osiris from DOS1. While the language has changed somewhat, the fundamentals are still similar/the same.