Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Trigger music to play in specific areas of the map

Dark_AnsemDark_Ansem Member Posts: 937
edited March 2018 in Builders - Scripting
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:
/*  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?

Comments

Sign In or Register to comment.