Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Khris on Wed 03/01/2024 08:46:42

Title: MODULE: GotThere 0.5
Post by: Khris on Wed 03/01/2024 08:46:42
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:
Code (ags) Select
function hSomeHotspot_Interact() {
  if (WalkFace(123, 45, eDirectionLeft)) {
    // what happens when the player reaches those coordinates goes in here
  }
}
Title: Re: MODULE: GotThere 0.5
Post by: cat on Wed 03/01/2024 19:31:42
A few caveats for people who want to use this module: