Deleted2746547User Posted May 22, 2015 Share Posted May 22, 2015 HOW WOULD I FIX MY SCRIPT TO INCLUDE A FADE TO BLACK, PLAY A SOUND AND TAKE A GAME HOUR OR SO DOING IT. I THINK I KNOW THE SCRIPT TO ADD THE PIECES (THAT IS I KNOW HOW TO DO A FADE SCRIPT/PLAY MUSIC) BUT i DON'T KNOW HOW TO CHANGE MY SCRIPT (SYNTAX) TO MAKE THAT WORK...scn BlackbriarNorthRedoubtBuildScript short AwaitingInputshort buttonVar begin OnActivate ShowMessage BlackbriarWashoeNorthRedoubtChoiceMesg set awaitingInput to 1 end begin gamemodeif awaitingInput == 1set buttonVar to getbuttonpressed if buttonVar > -1set awaitingInput to 0 if buttonVar == 0If BlackbriarBaseStorageRef.GetItemCount BlackbriarHammer >= 1 && BlackbriarBaseStorageRef.GetItemCount BlackbriarMetalResource >= 6 && BlackbriarBaseStorageRef.GetItemCount BlackbriarSandbag >= 18 && BlackbriarBaseStorageRef.GetItemCount BlackbriarResourceWood >= 8 BlackbriarBaseStorageRef.removeitem BlackbriarHammer 1BlackbriarBaseStorageRef.RemoveItem BlackbriarSandbag 18 BlackbriarBaseStorageRef.RemoveItem BlackbriarMetalResource 6 BlackbriarBaseStorageRef.RemoveItem BlackbriarResourceWood 8 BlackbriarNorthRedoubtGuardPlacement.enable ; places hiring clipboard BlackbriarNorthernRedoubtActivatorRef.Enable ; builds redoubt & checkpoints BlackbriarNorthRedoubtActivatorRef.Disable ; disables build anvil BlackbriarNorthRedoubtActivatorRef.markfordelete ShowMessage BlackbriarConstructionUnderwayMsg SetStage BlackbriarOPFire 30 else ShowMessage BlackbriarWashoeBuildingMaterialsMsgendif elseif buttonVar == 1ShowMessage BlackbriarNextTimeMsgendifendifendifend Link to comment Share on other sites More sharing options...
Jokerine Posted May 22, 2015 Share Posted May 22, 2015 I'm not sure of how your script actually works (it's 1.30 AM and I'm too tired to dig through, going to sleep soon) so I can't tell you exactly where to add the code, but to make an hour pass use "SetPcSleepHours 1", for the fade to black use "imod FadeToBlackISFX" (there are several fade to black variants in ImageSpace Modifiers) and to play music use PlaySound [soundID]. Not sure if that actually helps. Sorry if it's not very useful. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted May 23, 2015 Author Share Posted May 23, 2015 Jokerine ... how do you mean how it actually works? What's wrong with the code? RIght now, when you activate an activator it runs the script. What effect I'm trying to come up with is where it seems like it took time for the changes (items enabled to appear). hence, the fade to black and the passage of time. And since you're building or doing something, the sound. :) I know how to do the pieces you mentioned but to get them to work in this or a similar code... i'm at a loss. That is, the syntax.. (begin game mode, etc.) THANKS for the reply though... you are always awesome. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted May 23, 2015 Author Share Posted May 23, 2015 Here's kind of what I mean.. with this script I "Mine" for materials. When you activate the script a message displays, the screen fades to black, it plays a sound and a few hours passes. But no way I've tried to "merge" this effect with the other script work. That is scn BlackbriarResourceMetalMiningScriptMAIN int State Begin onActivateIf BlackbriarBaseStorageRef.GetItemCount BlackbriarRancherAxe >= 1 && BlackbriarBaseStorageRef.GetItemCount BlackbriarHempbag >= 5 && State == 0 && GetActionRef == playerset State to 1elseShowMessage BlackbriarYouNeedGearzMesg endifEnd Begin GameMode If State == 1imod FadeToBlackISFXPlaysound BlackbriarBlackSmithHammerRewardXP 5BlackbriarBaseStorageRef.removeitem BlackbriarHempbag 5Player.DamageActorValue Health 5Player.ModActorValue Strength 2Player.DamageActorValue Dehydration 5Player.DamageActorValue Hunger 5BlackbriarBaseStorageRef.additem BlackbriarMetalOreResource 3BlackbriarBaseStorageRef.additem BlackbriarOreMineralResource 2BlackbriarBaseStorageRef.additem BlackbriarPreciousMetalResource 1set gamehour to gamehour + 6 ShowMessage BlackbriarSaltMinigMesgset State to 0 Endif End Link to comment Share on other sites More sharing options...
sentimeta Posted May 23, 2015 Share Posted May 23, 2015 I'm pretty new to scripting and I might not be fully understanding what you're trying to do, but it seems to me like you can just insert it in. I don't know if objects are going to be enabled right in front of the player, but just in case they are, I included a timer, too. This seems like it would work: scn BlackbriarNorthRedoubtBuildScript short AwaitingInput short buttonVar Short Timer begin OnActivate ShowMessage BlackbriarWashoeNorthRedoubtChoiceMesg set awaitingInput to 1 end begin gamemode if awaitingInput == 1 set buttonVar to getbuttonpressed if buttonVar == 0 If BlackbriarBaseStorageRef.GetItemCount BlackbriarHammer >= 1 && BlackbriarBaseStorageRef.GetItemCount BlackbriarMetalResource >= 6 && BlackbriarBaseStorageRef.GetItemCount BlackbriarSandbag >= 18 && BlackbriarBaseStorageRef.GetItemCount BlackbriarResourceWood >= 8 BlackbriarBaseStorageRef.removeitem BlackbriarHammer 1 BlackbriarBaseStorageRef.RemoveItem BlackbriarSandbag 18 BlackbriarBaseStorageRef.RemoveItem BlackbriarMetalResource 6 BlackbriarBaseStorageRef.RemoveItem BlackbriarResourceWood 8 imod FadeToBlackISFX if Timer < 3 ;This makes 3 seconds pass, because the fade to black takes a few seconds to make the screen fully black. set Timer to Timer + GetSecondsPassed else ;This is what will happen while the screen is black. PlaySound YourSoundGoesHere SetPCSleepHours 1 BlackbriarNorthRedoubtGuardPlacement.enable ; places hiring clipboard BlackbriarNorthernRedoubtActivatorRef.Enable ; builds redoubt & checkpoints BlackbriarNorthRedoubtActivatorRef.Disable ; disables build anvil BlackbriarNorthRedoubtActivatorRef.markfordelete ShowMessage BlackbriarConstructionUnderwayMsg SetStage BlackbriarOPFire 30 set awaitingInput to 0 endif else ShowMessage BlackbriarWashoeBuildingMaterialsMsg endif elseif buttonVar == 1 ShowMessage BlackbriarNextTimeMsg set awaitingInput to 0 endif endif end Again, I might be missing something, but I'm not sure that the Gamemode section of your mining script is needed. Where you have "set State to 1", why not just put the Gamemode section there? So it would be like this: scn BlackbriarResourceMetalMiningScriptMAIN int State Begin onActivate If BlackbriarBaseStorageRef.GetItemCount BlackbriarRancherAxe >= 1 && BlackbriarBaseStorageRef.GetItemCount BlackbriarHempbag >= 5 && State == 0 && GetActionRef == player imod FadeToBlackISFX Playsound BlackbriarBlackSmithHammer RewardXP 5 BlackbriarBaseStorageRef.removeitem BlackbriarHempbag 5 Player.DamageActorValue Health 5 Player.ModActorValue Strength 2 Player.DamageActorValue Dehydration 5 Player.DamageActorValue Hunger 5 BlackbriarBaseStorageRef.additem BlackbriarMetalOreResource 3 BlackbriarBaseStorageRef.additem BlackbriarOreMineralResource 2 BlackbriarBaseStorageRef.additem BlackbriarPreciousMetalResource 1 set gamehour to gamehour + 6 ShowMessage BlackbriarSaltMinigMesg else ShowMessage BlackbriarYouNeedGearzMesg endif End Link to comment Share on other sites More sharing options...
Deleted2746547User Posted May 23, 2015 Author Share Posted May 23, 2015 I had partially figured out the issue. But both your advice and Jokerine's helped. Thanks! Link to comment Share on other sites More sharing options...
Deleted2746547User Posted May 23, 2015 Author Share Posted May 23, 2015 (edited) Know I'm missing something small in this but what? Trying to get it to play the ShowMessage After screen fades back in. scn BlackbriarWashoeCleaningScript short timer Begin onActivateimod FadeToBlackISFX if Timer < 3 ;This makes 3 seconds passset Timer to Timer + GetSecondsPasseDPlaysound UIKarmaUpset gamehour to gamehour + 4BlackbriarFortWashoeCleaningActRef.disable; disable streetcleaner activatorBlackbriarFortWashoeCleaningActRef.markfordeleteBlackbrairASCCleaningCarREF.enable; turn on streetcar cleaner in ASC bldgBlackbriarBaseStorageRef.additem BlackbriarResourceWood 50; add resources from cleanup recycling to player base storageBlackbriarBaseStorageRef.additem BlackbriarHammer 3BlackbriarBaseStorageRef.additem BlackbriarFieldShovel 4BlackbriarBaseStorageRef.additem BlackbriarScrapMetal 50BlackbriarBaseStorageRef.additem BlackbriarGlassResource 20BlackbriarBaseStorageRef.additem BlackbriarFOODMRE11 20 BlackbriarBaseStorageRef.additem BlackbriarCanvas 20BlackbriarCleanUp.disable; disable clutter enabling x markerBlackbriarCleanUp.markfordeleteShowMessage BlackbriarResourcesAddedtoStoragesetStage BlackbriarOPCitadel 20endif Activate End Edited May 23, 2015 by Guest Link to comment Share on other sites More sharing options...
Deleted2746547User Posted May 23, 2015 Author Share Posted May 23, 2015 One final question tonight: I can't seem to find an answer on the crafting/inventory script. Trying to figure out how to pull ingredients, etc from a container when crafting items. So, the workbench, etc. checks that container for the items and then puts the crafted items back into that same container. Link to comment Share on other sites More sharing options...
Fallout2AM Posted May 23, 2015 Share Posted May 23, 2015 because it's not super easy and requires some line of code. I can think to at least 2 approaches: 1) introduce your own custom crafting system, at least under certain conditions, so that vanilla won't be touched 2) remove in game all the player's items, move them on a temporary container, transfer all the items of that container to the player, open the craftin menu and craft, when you close it you will do the inverse - trasferring the items from the player back to the container, and taking the player's item from the temporary container back to the player. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted May 23, 2015 Author Share Posted May 23, 2015 The code is the part I can't figure out either way. I have introduced 3 machines in the game that will basically serve to craft the recipes etc for the guns, equipment, etc I add with the mod. even if i were to only use that, I still cant' figure how to write the code to make it pull from a specific container....Speaking of scripts... still can't get this one to work........ I've tried it 100 different ways. I've tried it with timers (from the code in this thread) and a number of other combinations. Either it doesn't show the SHOWMESSAGE, does nothing or fades to black but never executes the rest of the script.$$$$$$$$$$$$$$$$$$$$$$$ scn BlackbriarWASHOESandbagBuildv2Script short AwaitingInputshort buttonVar begin OnActivate ShowMessage BlackbriarWashoeSandbagbaseChoiceMesg set awaitingInput to 1end begin gamemodeif awaitingInput == 1set buttonVar to getbuttonpressed if buttonVar > -1set awaitingInput to 0 if buttonVar == 0If BlackbriarBaseStorageRef.GetItemCount BlackbriarHammer >= 1 && BlackbriarBaseStorageRef.GetItemCount BlackbriarSandbag >= 24 && BlackbriarBaseStorageRef.GetItemCount BlackbriarSoldierDogtag >= 2 && BlackbriarBaseStorageRef.GetItemCount BlackbriarK9ResourceTrained >= 2BlackbriarBaseStorageRef.removeitem BlackbriarHammer 1BlackbriarBaseStorageRef.removeitem BlackbriarSandbag 24BlackbriarBaseStorageRef.removeitem BlackbriarSoldierDogTag 2BlackbriarBaseStorageRef.removeitem BlackbriarK9ResourceTrained 2 BlackBriarSandbagBuildSwitchRef.disable; removes the anvil build base activator item from areaBlackBriarSandbagBuildSwitchRef.markfordeletePlaysound BlackbriarBlackSmithHammerimod FadeToBlackISFXset gamehour to gamehour + 4BlackbriarTempGuardTowerBuildSwitch.enable; enable build anvil for sandbag towersBlackbriarFtGaltCourtyardGaurdsRef.enable; enable courtyard and perimeter guardsBlackbriarCitdaelConstruction5REF.enable; enables x marker to build sandbag defensessetStage BlackbriarOPCitadel 60; ShowMessage BlackbriarConstructionUnderwayMsgendifendifelse ShowMessage BlackbriarConstructionsnoMaterialsnoBSCMsgn endif elseif buttonVar == 1ShowMessage BlackbriarNextTimeMsgset awaitingInput to 0endifendif endifend Link to comment Share on other sites More sharing options...
Recommended Posts