In a basic BASS / Sierra game, start a non-blocking walk toward something when interacting with it that can be canceled by the player at any time.
Download: GotThere.scm (https://drive.google.com/file/d/1v3NbuPrvATW4LrTVnsNC2HLuoYHnQ-Fr/view?usp=sharing)
The module provides a single function:
bool WalkFace(int x, int y, CharacterDirection dir)
Use it like this:
function hSomeHotspot_Interact() {
if (WalkFace(123, 45, eDirectionLeft)) {
// what happens when the player reaches those coordinates goes in here
}
}
A few caveats for people who want to use this module:
- There are some issues to take care of when using this module in combination with the BASS template https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/gotthere-problem-still-works/ (https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/gotthere-problem-still-works/)
- The module only works if the MaskResolution of every room where the module is used is 1:1
- Due to how the module is coded, I think it will only work for code that is triggered by character, object or hotspot interaction. It will not work when entering regions, clicking a GUI or something like room_AfterFadeIn.