erican_lord Posted December 30, 2009 Share Posted December 30, 2009 Ok The Music Amulet Works Like This: When You Equip It It Opens A Menu And Asks You To Choose From 3 Different Songs(which are labeled masong001, masong002, and masong003 and they are all located in the oblivion/data/sounds/Music folder) Depending On Which Song You Choose It Plays That Sound, On A loop Until You EUnequip YThe Amulet, And Once You Unequip The Amulet The Music Resets And Then You Can Equip It AgAin To Select A New Song if You Want. BNow How Do I Script This? Can Someone Please Script This For me?? Link to comment Share on other sites More sharing options...
David Brasher Posted December 31, 2009 Share Posted December 31, 2009 Here is a script that is somewhat like what you want. I am not sure how do do exactly what you had in mind. This script makes the sounds play once and then there is silence. There is no way to stop the sound once started. It plays to the end and then stops. This object script placed on an amulet uses vanilla Oblivion and SI .wav sounds and you should be able to copy it right into your mod for testing, evaluation, and modification. I do not know if your music is .MP3 or .wav. I think PlaySound only works with wavs. If you use looping wav. sounds, they play forever with no way to stop them and you must revert to a savegave. StreamMusic can use MP3s, but can't repeat songs. After your song ends, something you don't want might play, and things like combat will stop your song from playing. Perhaps this script will give you a start in the right direction. SCN AATestMusicalAmuletSCRIPT Short Working Short Choosing Short Choice Begin OnEquip Set Choosing to -1 Set Working to 1 End Begin GameMode If Working Set Working to 1 Endif If (Choosing == 0) Set Working to 0 Elseif (Choosing == -1) Messagebox "What song do you want to play?" "Bells" "Chimes" "Spinning" "No Music" Set Choosing to 1 Set Choice to -1 Elseif (Choosing == 1) If (Choice == -1) Set Choice to GetButtonPressed Elseif (Choice == 0) PlaySound AMBBellTower Set Choosing to 0 Elseif (Choice == 1) PlaySound AMBChimesHit01 Set Choosing to 0 Elseif (Choice == 2) PlaySound AMBTurretSpin Set Choosing to 0 Elseif (Choice == 3) Set Choosing to 0 Endif Endif End Link to comment Share on other sites More sharing options...
Recommended Posts