Yes, this is the correct way to solve this. The important part is that you can assign footstep sounds to your view's frames.
One caveat is that region events are not triggered during blocking walks; this is a general issue with regions that can be solved like this:
Code: ags
This keeps cropping up from time to time, so maybe AGS4 could provide the option to always trigger region events?
One caveat is that region events are not triggered during blocking walks; this is a general issue with regions that can be solved like this:
function region1_WalksOnto(Region *theRegion)
{
player.ChangeView(VHOLOGRAM);
}
function region1_WalksOff(Region *theRegion)
{
player.ChangeView(VROGER_WALK);
}
Region* prevRegion;
void repeatedly_execute_always() {
Region* currRegion = Region.GetAtRoomXY(player.x, player.y);
if (currRegion != prevRegion) {
if (currRegion == region[1]) region1_WalksOnto(currRegion);
if (prevRegion == region[1]) region1_WalksOff(currRegion);
}
prevRegion = currRegion;
}
This keeps cropping up from time to time, so maybe AGS4 could provide the option to always trigger region events?