SetFrameSound problem

Started by Oz, Sat 02/04/2005 20:19:51

Previous topic - Next topic

Oz

I use the following piece of code to play back an alternate set of footstep sounds when the player walks onto a specific region:

function region1_a() {
  // script for region1: Player walks onto region
SetFrameSound(20,0,6,28); //view, loop, frame, sound
SetFrameSound(20,0,16,29);
SetFrameSound(20,1,6,30);
SetFrameSound(20,1,16,29);
SetFrameSound(20,2,6,28);
SetFrameSound(20,2,16,31);
SetFrameSound(20,3,6,30);
SetFrameSound(20,3,16,31);
}

The above code repeats for each of the loops in the character's walk view.
However, nothing happens! No change. I've set default footstep sounds in the view editor for each loop of the walking animation and as far as I see the above code SHOULD change these sounds when the player walks onto the region.

What am I missing?
Diversity is divine!

strazer

Do the sound files exist in the game folder?
Are you sure you're using the correct view number?
Is the region enabled?
Is the region event triggered at all? Put
  int soundnum = GetGameParameter(GP_FRAMESOUND, 20, 0, 6);
  Display("%d", soundnum);
in there to see if the Display command executes at all and to see if the new frame sound has been set.

SMF spam blocked by CleanTalk