Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: MrColossal on Sun 27/07/2003 22:48:54

Title: footstep sounds problem
Post by: MrColossal on Sun 27/07/2003 22:48:54
hello there

so i have a bit of code set up to handle my footsteps

// begin footsteps

footsteptype = GetRegionAt(character[EGO].x,character[EGO].y);

if (character[EGO].frame==3){
 PlaySound(footsteptype);
 }
if (character[EGO].frame==6){
 PlaySound(footsteptype+1);
 }

// end footsteps


everything works fine except for movecharacterblocking commands, no sound is played

so is their a better way that i'm not seeing or is this a suggestion?

any help is much appreciated

eric
Title: Re:footstep sounds problem
Post by: Pumaman on Mon 28/07/2003 01:04:05
During MoveCharacterBlocking your script won't be run.

Can't you just use the built-in frame sounds rather than using a script?
Title: Re:footstep sounds problem
Post by: MrColossal on Mon 28/07/2003 01:43:04
but using a script allows me to see what region the character is standing on so i can devote certain regions to different foot step sounds

dig it?

region 2 is normal, region 4 is wooden floor, and region 6 is gravel
Title: Re:footstep sounds problem
Post by: TerranRich on Mon 28/07/2003 04:12:13
So why not, on the "Player stands on region" interaction, just add a SetFrameSound() command there to change it/them over each different region?
Title: Re:footstep sounds problem
Post by: MrColossal on Mon 28/07/2003 07:56:15
well i guess it helps to know all the new features...

hooray for dummies!
Title: Re:footstep sounds problem
Post by: Pumaman on Sat 02/08/2003 23:21:42
But of course that won't work either if a MoveCharBlocking command is in progress. It's an interesting situation actually.

The solution would have to be to not use MoveCharBlocking, and instead do:

MoveCharacter (...);
while (character[CHARID].walking) {
Wait(1);
repeatedly_execute();
}