Trigger music to play in specific areas of the map
Dark_Ansem
Member Posts: 992
As per title, I'm trying to make a script that will change the BGM of the area you're in once you step in the area, and revert it back once you leave the area.
This is the "in" script:
This is the "in" script:
/* name : bgm_trchange_in purpose : changes BGM music when the PC steps in the area by Dark_Ansem */ void main() { object oPC = GetEnteringObject(); if ( GetIsPC(oPC) ) { PlayCharacterTheme(XX); } }And this is the "out" script:
/* name : bgm_trchange_out purpose : reverts BGM music when the PC steps out the area by Dark_Ansem */ void main() { object oPC = GetExitingObject(); if ( GetIsPC(oPC) ) { PlayOldTheme(); } }However, they don't work. Any help please?
0
Comments
MusicBackgroundChangeDay(GetArea(oPC), ##);
## is the track reference from your ambientmusic.2da file
I got the idea off the OC's scripts when talking with Aribeth or Aarin, what did I do wrong?
Source: