Region Sounds Script (2 different walk Sounds for one room)

Started by Eon_Star, Tue 31/08/2021 20:11:12

Previous topic - Next topic

Eon_Star

Hi Folks!

I was trying to set different sounds to the different regions. First I set this code together (from other scripts in the forum):

Code: ags


function room_RepExec()
{
if (Region.GetAtRoomXY(player.x, player.y) == region[1]) {
     
      {
 if(cLiza.x >=369 && (cLiza.Frame==3 || cLiza.Frame==6))  
{      
 aWalk_on_Sand.Play(eAudioPriorityHigh);
 
 
 }
      }
}
}



Then I set my characters walking view sounds (The related sound to the related frame). The result is good. So I have two different walking sounds for one room.

You can give it a try if you need. Happy programming guys.

Cheeres


SMF spam blocked by CleanTalk