footstep sounds problem

Started by MrColossal, Sun 27/07/2003 22:48:54

Previous topic - Next topic

MrColossal

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
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

Pumaman

During MoveCharacterBlocking your script won't be run.

Can't you just use the built-in frame sounds rather than using a script?

MrColossal

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
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

TerranRich

So why not, on the "Player stands on region" interaction, just add a SetFrameSound() command there to change it/them over each different region?
Status: Trying to come up with some ideas...

MrColossal

well i guess it helps to know all the new features...

hooray for dummies!
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

Pumaman

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();
}

SMF spam blocked by CleanTalk