Do you stop crypt.ogg and play aguado.ogg befor opening your menu window?
If so, you saving aguado.ogg as active music file.
No. The music aguado.ogg begins because Game.PlayMusic(); is written in the menu code and it starts automatically when I pass to Menu.
When I'm in game (Crypt scene) I press Esc, the Main menu appears. Then I press Save game/Load game. The Save game window appears and when I press on the first slot the game saves and automatically resumes to Crypt scene but the music plays still from menu.
How to make a music play only one time in scene cause it repites by default?
And I have a question about items.
Lets say I have a book in inventory and I would like that on right click on it, the book to dissapear and another item to appear. Where should I write the code on "RightClick" for this to happen cause I already have a code in book.script for taking the book from floor:
on "RightClick"
{
actor.GoTo(173, 367);
actor.TurnTo(DI_UPLEFT);
Game.Interactive = false;
actor.Talk("I'll take it.");
// play "take" animation
actor.PlayAnim("actors\molly\ul\take1.sprite");
// hide the book entity and place "book" item into the inventory
Game.TakeItem("book");
var EntBook = Scene.GetNode("book");
EntBook.Active = false;
// play the second "take" animation
actor.PlayAnim("actors\molly\ul\take2.sprite");
Game.Interactive = true;
}
-----------------------
And what should I add in game.script in this line:
on "RightClick"
{
// if inventory item selected? deselect it
if (Game.SelectedItem != null){
Game.SelectedItem = null;
return;
}
var ActObj = Game.ActiveObject;