I am making my new game in ags 2.72, and I can't change the footstep sound in a room.
In older versions I just simply use SetFrameSound, but I can't use it now.
Please tell me, how this ViewFrame.Sound works, because I can't get it.
There's an extra step you have to take, to make it work now. While you used to be able to access the frame directly with SetFrameSound, you now have to make a ViewFrame pointer to the frame and use the ViewFrame.Sound property. The example in the manual (http://www.adventuregamestudio.co.uk/manual/ViewFrame.Sound.htm) is pretty clear for the first part (making the pointer), although it only shows getting the property, not setting it.
Basically, instead of:
SetFrameSound (1, 2, 0, 25); // Set Frame 0 of Loop 2 of View 1 to play sound25
You'd now use:
ViewFrame *frame = Game.GetViewFrame(1, 2, 0); // Create pointer to Frame 0 of Loop 2 of View 1
frame.Sound = 25; // Set frame's sound to 25
To change multiple frame sounds, you need to update the pointer and repeat:
ViewFrame *frame = Game.GetViewFrame(1, 2, 0);
frame.Sound = 25; // Same as above
frame = Game.GetViewFrame(1, 2, 3); // Now setting Frame 3 of Loop 2
frame.Sound = 25;
frame = Game.GetViewFrame(1, 2, 6); // And Frame 6
frame.Sound = 25;
//etc
Thank you!
I couldn't set it by the manual, but it's working now! :)