zlostnypopolnik Posted August 10, 2023 Share Posted August 10, 2023 Hi... Could someone, please, explain to me how to put a sound trigger in CK in the interior or exterior? The player character walks in a corridor and when he passes a certain point, a sound or voice is heard. I managed to create a sound trigger in Dunwich Borers, but it is a hallucination-like trigger, I would like to create a trigger with only sound and/or voice. I tried all kinds of possibilities, but nothing really worked for me and I can't find a good tutorial. Thanks. Link to comment Share on other sites More sharing options...
Zorkaz Posted August 11, 2023 Share Posted August 11, 2023 Under Activators you can find and place a box called "Defaultemptytrigger", which is an empty triggerzone.You need to place adjust the volume of the box. Then you add a script that's like this Sound Property TheSoundToPlay Auto Event OnTriggerEnter (ObjectReference AkActionRef) If AkActionRef == Game.Getplayer() TheSoundToPlay.play(Self) Self.disable() Endif EndEventAfter that fill the sound property to the sound you want to play Link to comment Share on other sites More sharing options...
zlostnypopolnik Posted August 11, 2023 Author Share Posted August 11, 2023 (edited) Holy moly, advice from Zorkaz himself. Thanks. I will try it immediately tomorrow. Edited August 11, 2023 by zlostnypopolnik Link to comment Share on other sites More sharing options...
zlostnypopolnik Posted August 12, 2023 Author Share Posted August 12, 2023 Under Activators you can find and place a box called "Defaultemptytrigger", which is an empty triggerzone.You need to place adjust the volume of the box. Then you add a script that's like this Sound Property TheSoundToPlay Auto Event OnTriggerEnter (ObjectReference AkActionRef) If AkActionRef == Game.Getplayer() TheSoundToPlay.play(Self) Self.disable() Endif EndEventAfter that fill the sound property to the sound you want to playHi...Sorry to bother you with this, but I probably won't figure it out on my own. I've already tried everything I can think of that, according to my logic, could be there.I created a trigger, set it in the interior, defined the sound that the trigger should play, named everything, entered the script given by you, but for the life of me I can't figure out what is:TheSoundToPlay Compiler Output message (when I don't enter any value): missing ID at 'Auto'const scripts may only contain const auto properties. Property <missing ID> cannot be definedconst scripts may not contain data, script variable ::<missing ID>_var cannot be defined Could you please tell me what it is and where I can find it:TheSoundToPlay - <missing ID>Thanx. Link to comment Share on other sites More sharing options...
pepperman35 Posted August 12, 2023 Share Posted August 12, 2023 Did you perform the last step of Zorkaz's instruction: "After that fill the sound property to the sound you want to play." This step maps your "sound that the trigger should play" to the variable "TheSoundToPlay" in the script. Link to comment Share on other sites More sharing options...
niston Posted August 12, 2023 Share Posted August 12, 2023 Try adding this first line: Scriptname Soundtriggerscript extends ObjectReference rest of script Make sure to save the .psc file in /Scripts/Source/User and then compile. Link to comment Share on other sites More sharing options...
zlostnypopolnik Posted August 12, 2023 Author Share Posted August 12, 2023 Did you perform the last step of Zorkaz's instruction: "After that fill the sound property to the sound you want to play." This step maps your "sound that the trigger should play" to the variable "TheSoundToPlay" in the script.I'll have to do it all over again, I must have missed something. Thanks for the reply.This is my first attempt, so far I've only done things in xEdit. To me, CK is like theoretical cubohysterical nuclear physics. Link to comment Share on other sites More sharing options...
Zorkaz Posted August 12, 2023 Share Posted August 12, 2023 My bad. If it's a Const script it should be Sound Property TheSoundToPlay Auto Const instead of Sound Property TheSoundToPlay Auto Link to comment Share on other sites More sharing options...
zlostnypopolnik Posted August 12, 2023 Author Share Posted August 12, 2023 My bad. If it's a Const script it should be Sound Property TheSoundToPlay Auto Constinstead of Sound Property TheSoundToPlay AutoIt works. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts