LithianLord Posted June 6, 2010 Share Posted June 6, 2010 Hey all, i need quick help with a piece of script. I am still learning scripting so if I am unable to do something specific, just let me know. First, I would like it so my script starts after the player has left vault 101. Does anyone know an easy way to do this as: 1. A player using Alt Start does not finish Escape! so I cannot just have it check for completion 2. A quest delay would be inconvenient to players who download and want to play right away. Unless there is a way to have the delay check in-game time instead of running on its own counter. Second, I would like it to play a sound file after the delay check. I am using the code: Short DoOnce Begin OnTriggerif DoOnce == 0PlaySound SoundNameset DoOnce to 1endif Obviously let me know if this is wrong, but my main question is what do I set SoundName. I assume the exact file location? Or just the sound name in the sound folder? Last I would like it to start a new Quest, but I think I got the handle on that one. Thanks in advance. Link to comment Share on other sites More sharing options...
BadPenney Posted June 6, 2010 Share Posted June 6, 2010 You just need the name of the sound as it is listed in the GECK under Sound, for example: PlaySound AMBElevatorBell An easy way to check if the player has left Vault 101 that would not conflict with alternate start mods might be simply to require that the player is in the Wasteland. if ( Player.GetInWorldSpace Wasteland == 1 ) Since leaving the vault is the first time that the player enters the Wasteland that should trigger your action. Including a doOnce argument will assure that your action will happen only one time. Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted June 6, 2010 Share Posted June 6, 2010 By the way, the Alternate Starts mod *does* finish the Escape! quest so you can key on that. Link to comment Share on other sites More sharing options...
LithianLord Posted June 6, 2010 Author Share Posted June 6, 2010 You just need the name of the sound as it is listed in the GECK under Sound, for example: PlaySound AMBElevatorBell An easy way to check if the player has left Vault 101 that would not conflict with alternate start mods might be simply to require that the player is in the Wasteland. if ( Player.GetInWorldSpace Wasteland == 1 ) Since leaving the vault is the first time that the player enters the Wasteland that should trigger your action. Including a doOnce argument will assure that your action will happen only one time. If i had a custom wav file, how would I then get it into the GECK for listing? And thank you for the code snippit, that helps me a lot. By the way, the Alternate Starts mod *does* finish the Escape! quest so you can key on that. I was not aware, then it completes all Vault Quests? ----------------------------------------------This is my current code. Is this correct or any suggestions? ScriptName UVBQuestScript Short DoOnce Begin OnTrigger if DoOnce == 0 if ( Player.GetInWorldSpace Wasteland == 1 ) set DoOnce to 1 endif Short DoOnce Begin OnTrigger if DoOnce == 0 PlaySound SoundName set DoOnce to 1 endif begin onTrigger player if getStage UVB76 < 1 setStage UVB76 1 endif End Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted June 6, 2010 Share Posted June 6, 2010 I don't know about all the vault quests, but when you leave the shack it will pop up that Escape!, at least, is complete. I am speaking of the mod by khet specifically, other alt start mods may not do this. Link to comment Share on other sites More sharing options...
LithianLord Posted June 6, 2010 Author Share Posted June 6, 2010 I don't know about all the vault quests, but when you leave the shack it will pop up that Escape!, at least, is complete. I am speaking of the mod by khet specifically, other alt start mods may not do this. Yeah, Khet's is the best. I either never noticed or he changed it in the newer version. Either way, ifWasteland is the perfect solution. EDIT: Ok, what would be really helpful right now is for someone to give me a brief explination on how to get this working. I want this to start right as wasteland==1 but it is not working. Do i place this script somewhere special, or am I being special for not getting it to work? Link to comment Share on other sites More sharing options...
BadPenney Posted June 6, 2010 Share Posted June 6, 2010 "If i had a custom wav file, how would I then get it into the GECK for listing?" Try navigating to the Sounds portion of the Object Window of the GECK to sounds that are similar to your custom sound might be found, right click on the list of them and select "New". Make a name that makes sense to you ( i.e. FXMySound ) and link it to your custom sound's file. Research the directory structures for sound effects with FOMM and copy them ( i.e. \Data\Sound\fx\FXMySound.wav ). It helps to keep the same directories that Bethesda did if you unpack vanilla sounds from the .BSAs for reuse. As for your script: I would recommend making it a quest script. Your Quest should be start game enabled and your Quest Script should be selected in the Script box on the first page Quest Data on your Quest window. In a code block that uses "Begin GameMode" include that condition "if ( Player.GetInWorldSpace Wasteland == 1 )" in order to get things going. If you use "Begin OnTrigger" then you will have to attach the quest to a trigger box but "Begin GameMode" in a quest script will operate even if the player enters the Wasteland in an unknown part of the map. Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted June 6, 2010 Share Posted June 6, 2010 I don't know about all the vault quests, but when you leave the shack it will pop up that Escape!, at least, is complete. I am speaking of the mod by khet specifically, other alt start mods may not do this. Yeah, Khet's is the best. I either never noticed or he changed it in the newer version. Either way, ifWasteland is the perfect solution. EDIT: Ok, what would be really helpful right now is for someone to give me a brief explination on how to get this working. I want this to start right as wasteland==1 but it is not working. Do i place this script somewhere special, or am I being special for not getting it to work? It needs to be a quest script and the quest should have 'start game enabled' ticked. edit: Oh, BP said that didn't he? Well he's right. Link to comment Share on other sites More sharing options...
LithianLord Posted June 7, 2010 Author Share Posted June 7, 2010 "If i had a custom wav file, how would I then get it into the GECK for listing?" Try navigating to the Sounds portion of the Object Window of the GECK to sounds that are similar to your custom sound might be found, right click on the list of them and select "New". Make a name that makes sense to you ( i.e. FXMySound ) and link it to your custom sound's file. Research the directory structures for sound effects with FOMM and copy them ( i.e. \Data\Sound\fx\FXMySound.wav ). It helps to keep the same directories that Bethesda did if you unpack vanilla sounds from the .BSAs for reuse. As for your script: I would recommend making it a quest script. Your Quest should be start game enabled and your Quest Script should be selected in the Script box on the first page Quest Data on your Quest window. In a code block that uses "Begin GameMode" include that condition "if ( Player.GetInWorldSpace Wasteland == 1 )" in order to get things going. If you use "Begin OnTrigger" then you will have to attach the quest to a trigger box but "Begin GameMode" in a quest script will operate even if the player enters the Wasteland in an unknown part of the map. Thank you. Got that all except the Begin GameMode. That was my problem. So for the PlaySound SoundName i would write a snippit of: if DoOnce == 0 PlaySound \Data\Sound\fx\FXMySound.wav set DoOnce to 1 endif ? Link to comment Share on other sites More sharing options...
BadPenney Posted June 7, 2010 Share Posted June 7, 2010 So for the PlaySound SoundName i would write a snippit of: if DoOnce == 0 PlaySound \Data\Sound\fx\FXMySound.wav set DoOnce to 1 endif ?No. I'm not sure that I can explain more clearly than I have already attempted. A sound is like any other object. If you create a piece of custom armor then you first create its object name in the GECK. Say I make KevlarVest as a new armor. I open an edit window for a new object, give it an item ID like KevlarVest and then I list the directory locations of the .NIF and .DDS files that are my custom files. Then I don't have to include those directory locations in a GECK script, just the Item ID. ( player.additem KevlarVest 1 ). It is the same routine with sound files. if DoOnce == 0 PlaySound KevlarVestHit set DoOnce to 1 endif Link to comment Share on other sites More sharing options...
Recommended Posts