MasterAub Posted January 24, 2024 Posted January 24, 2024 (edited) Here is the script And the message I got is the following: PlaySound is not a function or does not exist Scriptname aaaMWHPlaySoundScript extends ObjectReference {play this sound when activating the Soulfiller} ObjectReference Property MySoulgemFillerRef Auto Sound property MAGMysticismSoulTrapCaptureSD auto Event OnActivate(ObjectReference akActionRef) Debug.Trace("Activated by " + akActionRef) PlaySound (MAGMysticismSoulTrapCaptureSD) EndEvent What do I do wrong? Please help Edited January 24, 2024 by MasterAub
IsharaMeradin Posted January 24, 2024 Posted January 24, 2024 PlaySound is a console command. As such it does not work in papyrus. Instead use Play. MAGMysticismSoulTrapCaptureSD.Play(Self) 1
MasterAub Posted January 24, 2024 Author Posted January 24, 2024 Thanks a lot. It doesn't seem like it but this little bugger of a script will go a long way.
MasterAub Posted January 31, 2024 Author Posted January 31, 2024 Ok my script does not work it compiles but it does not do the job. I am missing something The script goes on a type of custom workbench. And to be clear I would like the workbench to play the sound upon being activated by the player. Scriptname aaaMWHPlaySoundScript extends ObjectReference {play this sound when activating the Soulfiller} ObjectReference Property MySoulgemFillerRef Auto Sound property MAGMysticismSoulTrapCaptureSD auto Event OnActivate(ObjectReference akActionRef) MAGMysticismSoulTrapCaptureSD.Play(Self) Debug.Trace("Activated by " + akActionRef) EndEvent Property Name: MagMysticismSoulTrapCaptureSD Type: Sound Value: Default Property Name: MySoulgemFillerRef Type: ObjectReference Value: MySoulgemFillerRe(Id #) Somebody help and explain to me what I do wrong
IsharaMeradin Posted January 31, 2024 Posted January 31, 2024 Assign the correct sound to the MagMysticismSoulTrapCaptureSD property. A default value means that it is using what is assigned to it in the script. The script has nothing assigned to that variable. Thus no sound will play. If you named the property the same as the actual sound record, you should be able to use the auto-fill button to have it correctly assigned automatically. Properties are just variables. They have not data associated with them unless explicitly assigned in the Creation Kit or given a value within the script itself. 1
MasterAub Posted January 31, 2024 Author Posted January 31, 2024 (edited) Thanks I understand what you are saying however I did name the property the same as the actual record sound (so I think) but the CK does not auto fill it In the CK I found a sound in Sound Descriptor named: MagMysticismSoulTrapCaptureSD But when press auto the CK tels me: "0 property autofilled" Am I picking the wrong id for the sound? or the wrong sound? I am perplex Edited January 31, 2024 by MasterAub
IsharaMeradin Posted January 31, 2024 Posted January 31, 2024 You may need to see if you can manually assign it. The CK should show you a list of viable options based on your property type. 1
MasterAub Posted January 31, 2024 Author Posted January 31, 2024 ok it's working I picked up another sound and the autofilled worked just fine. The sound is playing as wanted. Thank you so much for your patience. Thanks
scorrp10 Posted February 13, 2024 Posted February 13, 2024 A 'Sound' property is filled with a Sound Marker object, not Sound Descriptor. So, if you specifically want it to play the sound from "MagMysticismSoulTrapCaptureSD" descriptor, you create a new Sound Marker form, name it however you want, and choose MagMysticismSoulTrapCaptureSD as its descriptor. Then you can populate a script Sound property with that Sound Marker.
Recommended Posts