grimmsin Posted January 29, 2017 Share Posted January 29, 2017 So I'm new to modding and I am currently trying to get 2 klaxons to work with a terminal and door. I'd like to have it so when the door is opened by the terminal the Klaxons go off but i have limited knowledge on scripting and could use a hand. I've looked for guides and youtube videos but have not had any luck finding the solution. Any help would be very appreciated. Thanks,Grimmsin Link to comment Share on other sites More sharing options...
LoneRaptor Posted January 29, 2017 Share Posted January 29, 2017 I assume you know how to make a terminal and a sound descriptor.The following script should do what you want:First you need to make some properties.These can be named whatever you want but if you change them they also need to change in the script.- YourDoor is an ObjectReference and points to the door you want to open.- KlaxonSound is a sound property and needs to be filled with the sound descriptor you made for the sound effects.- Klaxon is an ObjecReference for the Klaxon objects in the game so the sound originates from them.Paste this in the papyrus fragment field of the option that opens the door: YourDoor.Unlock() ; you only need to add this if the door is locked at first this ensures the player can open and close it afterwards YourDoor.SetOpen(true) ;Opens the door, if you want to close it again replace the true with false KlaxonSound.Play(Klaxon) ;This plays the sound coming from the klaxons Link to comment Share on other sites More sharing options...
grimmsin Posted January 29, 2017 Author Share Posted January 29, 2017 I know how to make a Terminal but not a sound descriptor. also on the Klaxon it already has scripts on it not sure if i need to do anything with them or just leave as is. lastly do i need to connect my 2 klaxons with an Xmarker or is there some other method to do so? Or do i just leave them as is. base objects im using are: GenericKlaxon2DLPMMarkerKlaxonLightGlowKlaxonLight01 Link to comment Share on other sites More sharing options...
LoneRaptor Posted January 29, 2017 Share Posted January 29, 2017 I had a look at the item you are referring to. And the script you mention is used to animate the lights. If you want that to work You'll probably have to add another line or two if you have 2 like this: Klaxon.Activate(Self) And looking at the pack in it might even be easier then the script above. because there is already a sound marker in the pack in. I haven't used these before but it looks like enabling them might just work. Try the following: Make a property for both GenericKlaxon2DLPMMarkers (I'll use SoundMarker1 and 2 in the script.Make a property for each Klaxon (Klaxon1 and Klaxon2) Klaxon1.Activate(Self) Klaxon2.Activate(Self) SoundMarker1.Enable() SoundMarker2.Enable() You might have to disable them again afterwards or they might keep going.If this doesn't work use the script from before and add the Activate lines and the sound descriptor you are looking for is called AMBIntAlarmGeneric2DLPM. Link to comment Share on other sites More sharing options...
grimmsin Posted January 29, 2017 Author Share Posted January 29, 2017 I'm forgetting to do something i know just not sure what >.< ers\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(9,0): variable Klaxon1 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(9,8): none is not a known user-defined script typeC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(10,0): variable Klaxon2 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(10,8): none is not a known user-defined script typeC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(11,0): variable SoundMarker1 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(11,13): none is not a known user-defined script typeC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(12,0): variable SoundMarker2 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(12,13): none is not a known user-defined script typeNo output generated for Fragments:Terminals:TERM_DefaultTerminalWallCOPY_0200A619, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on Fragments:Terminals:TERM_DefaultTerminalWallCOPY_0200A619 Do i need to make some kind of scripts for the Klaxons and sounds? Link to comment Share on other sites More sharing options...
shavkacagarikia Posted January 29, 2017 Share Posted January 29, 2017 (edited) I'm forgetting to do something i know just not sure what >.<ÃÂ ers\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(9,0): variable Klaxon1 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(9,8): none is not a known user-defined script typeC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(10,0): variable Klaxon2 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(10,8): none is not a known user-defined script typeC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(11,0): variable SoundMarker1 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(11,13): none is not a known user-defined script typeC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(12,0): variable SoundMarker2 is undefinedC:\Users\grimmsin\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalWallCOPY_0200A619.psc(12,13): none is not a known user-defined script typeNo output generated for Fragments:Terminals:TERM_DefaultTerminalWallCOPY_0200A619, compilation failed.ÃÂ Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on Fragments:Terminals:TERM_DefaultTerminalWallCOPY_0200A619ÃÂ ÃÂ Do i need to make some kind of scripts for the Klaxons and sounds?You should define variables and point them to base objects from properties. Like, open properties of that script, add new property of type light and name it klaxon1 and point it to base light object you want to use. Do that for other variables too Edited January 29, 2017 by shavkacagarikia Link to comment Share on other sites More sharing options...
grimmsin Posted January 29, 2017 Author Share Posted January 29, 2017 Not quite sure what you mean, im using the Papyrus Fragment section in the base properties of the terminal. my script skills are sub par Q,Q Link to comment Share on other sites More sharing options...
shavkacagarikia Posted January 29, 2017 Share Posted January 29, 2017 That fragment section has properties button, click it and properties window will apear add needed properties there as I suggested Link to comment Share on other sites More sharing options...
LoneRaptor Posted January 30, 2017 Share Posted January 30, 2017 Shavacagarikia is right you need to make properties. Use the button below the papyrus fragment labelled properties to add them. But because you already have an error you might have to click on the advanced tab and click edit script then remove the properties. They will be below the line ";end fragment code...." then save this and in the CK empty the papyrus field and type a single ";" in it (whitout quotes and click compile. Then Click ok and open the terminal again. This should clean up the errors. Now make the propterties. Click the properties button and click add property a new window will open in there for type select ObjectReference and for the name Type Klaxon1 Then click OK and Edit value. Select the first claxon object in the render window.Repeat this for the other properties. Types are as follows:Klaxon2: ObjectReferenceKlaxonSound: Sound You only need this if you are using the .play() function (first one) this is filled by selecting AMBIntAlarmGeneric2DLPM in the dropdown listSoundMarker1: ObjectReferenceSoundMarker2: ObjectReferenceYourDoor: ObjectReferece After they are all added click ok on the properties window and Ok on the terminal. Then open the terminal again and Add the fragment. YourDoor.Unlock() ; you only need to add this if the door is locked at first this ensures the player can open and close it afterwards YourDoor.SetOpen(true) ;Opens the door, if you want to close it again replace the true with false Klaxon1.Activate(Self) Klaxon2.Activate(Self) SoundMarker1.Enable() SoundMarker2.Enable() Link to comment Share on other sites More sharing options...
grimmsin Posted January 30, 2017 Author Share Posted January 30, 2017 Do i need to set object reference scrpits or? I can get the door script to work but any time i try and do anything with the klaxons it all goes to hell....Q.Q Link to comment Share on other sites More sharing options...
Recommended Posts