This is my first actual working script. It's simple, but I had to look all over the place to figure out how to do what. This script will play a sound effect when you enter the screen if you have a certain item. (In case you have something else in mind, you can set the item to whatever. Perhaps a trap detector to let you know there is a hidden trap on the screen?) As of now, I can't get it to work with the compass for a specific level, and I have no idea as to why it won't work with the compass. Any help?
//LA Compass
//This script will play a sound when you enter the screen
//and have a specific item.
//D0= Item Needed
//D1= Sound Played
import "std.zh"ffc script la_compass
{
void run(int have_item, int sound)
{
if(Link->Item[have_item]) //Checks to see if Link has the item
{
Game->PlaySound(sound); //Plays the sound
Quit(); //End of Script
}
}
}
Enjoy! 😃