jucoking Posted October 6, 2016 Share Posted October 6, 2016 Since my last question went unanswered I'll try another one: how do I make water that deals dps? I know there's a tickbox on watertype that lets you do this, but during testing it doesn't harm the player at all. Is there a script associated with this function to make it work? Link to comment Share on other sites More sharing options...
Magnusen2 Posted October 6, 2016 Share Posted October 6, 2016 Since my last question went unanswered I'll try another one: how do I make water that deals dps? I know there's a tickbox on watertype that lets you do this, but during testing it doesn't harm the player at all. Is there a script associated with this function to make it work?You should look at lava from Dawnguard DLC. It deals damage when the player enters it. Exactly what you're looking for. Link to comment Share on other sites More sharing options...
jucoking Posted October 7, 2016 Share Posted October 7, 2016 Since my last question went unanswered I'll try another one: how do I make water that deals dps? I know there's a tickbox on watertype that lets you do this, but during testing it doesn't harm the player at all. Is there a script associated with this function to make it work?You should look at lava from Dawnguard DLC. It deals damage when the player enters it. Exactly what you're looking for. Link to comment Share on other sites More sharing options...
jucoking Posted October 7, 2016 Share Posted October 7, 2016 Lol sorry bout that. Thanks for the info! Link to comment Share on other sites More sharing options...
thorGraves Posted October 9, 2016 Share Posted October 9, 2016 How to "chain" quests/unlock quests by other quests? For example I want to start my own quest, after the vanilla "A night to remember" is over. Obviously it's possible (the whole path of the main quests relies on it), but I can't find the hook to implement it. Any pointers to a tutorial? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 9, 2016 Share Posted October 9, 2016 How to "chain" quests/unlock quests by other quests? For example I want to start my own quest, after the vanilla "A night to remember" is over. Obviously it's possible (the whole path of the main quests relies on it), but I can't find the hook to implement it. Any pointers to a tutorial?If you wish to avoid modifying the stock quest...You can have a start game enabled quest with a script which registers for an update when initiated. On the update it checks to see if the target quest is completed or at a specific stage. If it is, start your actual quest, if it is not register for the update again. If you want to modify the stock quest...On the stage that ends the quest add a script fragment (or edit the existing one) that will trigger your quest to start. Links to functions/events to make either or both options possible: RegisterForSingleUpdate, OnUpdate, OnInit, Start, GetStage, IsCompleted Scripting basics tutorial -- http://www.creationkit.com/index.php?title=Bethesda_Tutorial_Basic_Quest_ScriptingAnother basic scripting tutorial -- http://www.creationkit.com/index.php?title=Bethesda_Tutorial_Papyrus_Hello_WorldQuest script fragment info -- http://www.creationkit.com/index.php?title=Quest_Stage_Fragments Link to comment Share on other sites More sharing options...
jucoking Posted October 9, 2016 Share Posted October 9, 2016 How to make an item that grants temporary invincibility? Link to comment Share on other sites More sharing options...
Magnusen2 Posted October 9, 2016 Share Posted October 9, 2016 Are you assigning the global variable properties in the Creation Kit? An error of 'cannot call GetValue() on a None object' typically indicates that the property variable intended to contain the global variable does not have a global variable assigned to it.Yes. With every actor that have the script (about 40+). But the log still gets spammed with errors.The NPCs still are invisible.Why are you using things like: SomeVar.GetValue() as floatGetValue() automatically returns a float. You do not need to cast it.Sorry. I didn't know.As far as questions 1 or 3. Those can't really be answered with just the snippets that are there. MCM scripts are very interconnected with parts for each option spread throughout the script. A little less spread out if using the State method, but still spread out.I was able to fix Issue #3 by replacing:This: SetSliderOptionValue(a_option, a_value) With this: SetSliderOptionValue(a_option, a_value, "{2}") Now when the slider is set 2 extra decimals appear.Below is the code with more structure. scriptname xxxMCMScript extends SKI_ConfigBase import Game import Utility String ModName GlobalVariable Property xxxNPCHeightMin Auto ;global that controls the minimum scale GlobalVariable Property xxxNPCHeightMax Auto ;global that controls the maximum scale ;Slider ints int _NPCHeightMin int _NPCHeightMax Event OnConfigInit() Pages = new String[2] Pages[0] = "$SDO_Page1" Pages[1] = "$SDO_Page2" EndEvent event OnPageReset(string page) ;{Called when a new page is selected, including the initial empty page} SetCursorFillMode(TOP_TO_BOTTOM) ;sets what appears when no page is selected If page == "" LoadCustomContent("logo.dds") Return Else UnloadCustomContent() EndIf if page == "$SDO_Page1" AddHeaderOption("$SDO_Height") _NPCHeightMin = AddSliderOption("$SDO_NPCHeightMin", xxxNPCHeightMin.GetValue(), "{2}") _NPCHeightMax = AddSliderOption("$SDO_NPCHeightMax", xxxNPCHeightMax.GetValue(), "{2}") elseif page == "$SDO_Page2" AddHeaderOption("$SDO_Page2") _Debug = AddTextOption("$SDO_Page2", "") AddEmptyOption() _Uninstall = AddTextOption("$SDO_Uninstall", "") endif EndEvent event OnOptionSliderOpen(int a_option) if (a_option == _NPCHeightMin) SetSliderDialogStartValue(xxxNPCHeightMin.GetValue()) SetSliderDialogDefaultValue(0.93) SetSliderDialogRange(0.70, 1.50) SetSliderDialogInterval(0.01) elseif (a_option == _NPCHeightMax) SetSliderDialogStartValue(xxxNPCHeightMax.GetValue()) SetSliderDialogDefaultValue(1.07) SetSliderDialogRange(0.70, 1.50) SetSliderDialogInterval(0.01) endif EndEvent Event OnOptionSliderAccept(int a_option, float a_value) {Called when the user accepts a new slider value} if (a_option == _NPCHeightMin) xxxNPCHeightMin.SetValue(a_value) SetSliderOptionValue(a_option, a_value) ValidateNPCHeightMin() ;calls a function that checks if the minimum value is greater than the maximum. If so, make the minimum match the maximum value elseif (a_option == _NPCHeightMax) xxxNPCHeightMax.SetValue(a_value) SetSliderOptionValue(a_option, a_value) ValidateNPCHeightMax() ;calls a function that checks if the maximum value is smaller than the minimum. If so, make the maximum match the minimum value endif EndEvent ;============================================================= ; Height validation functions. ;============================================================= ; If the minimum height is set by the user to a value ; bigger than the maximum height, sets the minimum ; height to the maximum height value. ;============================================================= ; If the maximum height is set by the user to a value ; smaller than the minimum height, sets the maximum ; height to the minimum height value. ;============================================================= Function ValidateNPCHeightMin() if (xxxNPCHeightMin.GetValue() > xxxNPCHeightMax.GetValue()) xxxNPCHeightMin.SetValue(xxxNPCHeightMax.GetValue()) setSliderOptionValue(_NPCHeightMin, xxxNPCHeightMin.GetValue()) endif EndFunction Function ValidateNPCHeightMax() if (xxxNPCHeightMax.GetValue() < xxxNPCHeightMin.GetValue()) xxxNPCHeightMax.SetValue(xxxNPCHeightMin.GetValue()) setSliderOptionValue(_NPCHeightMax, xxxNPCHeightMax.GetValue()) endif EndFunction Maybe this is happening because the script attached extends as Actor? It seems that GetValue on globals doesn't work on scripts that extends as actor. I had to use Game.GetFormFromFile and point it to the MCM script instead. Now everything works perfectly. Link to comment Share on other sites More sharing options...
thorGraves Posted October 9, 2016 Share Posted October 9, 2016 (edited) If you wish to avoid modifying the stock quest...You can have a start game enabled quest with a script which registers for an update when initiated. On the update it checks to see if the target quest is completed or at a specific stage. If it is, start your actual quest, if it is not register for the update again. If you want to modify the stock quest...On the stage that ends the quest add a script fragment (or edit the existing one) that will trigger your quest to start. I don't want to modify the stock quests, yet it would be nice to understand the mechanics behind them (if only for the next quest I have in mind to follow my current project). I think found the stock quest fragments. Setting stages in the follow-up-quests (In MQ102 there's "MQ103.SetStage(10)"). That's pretty backwards from what I thought, but it'll do. Thank you. Edited October 9, 2016 by thorGraves Link to comment Share on other sites More sharing options...
Josephish Posted October 10, 2016 Share Posted October 10, 2016 (edited) Is there a way to fire the currently equipped shout? I know about GetEquippedShout, but I'm not sure how to 'cast' it. is is it just spells? Edited October 10, 2016 by Josephish Link to comment Share on other sites More sharing options...
Recommended Posts