lofgren Posted January 15, 2015 Share Posted January 15, 2015 I don't understand what you mean by "processing" nor "pass[ing] it through GetForm." All I did was add the form id to a formlist.OK, then I have no idea why it isn't working for you although it might be yet another issue with the "high-order bit" problem. GetForm won't work correctly on any formID that is 0x80000000 or higher because those values all become negative numbers to Papyrus which GetForm then fails to treat as proper formID values. It's possible you've found another situation where the large formID values aren't processed correctly.Faaaascinating. Clearly I'll have to test this with an item that comes from a mod that loads later than 80. Althouh it hardly matters since the method is useless to me if it can't process dynamic items anyway. Link to comment Share on other sites More sharing options...
Ellorienne Posted January 16, 2015 Share Posted January 16, 2015 Is there a way to change an object's directory in the CK? Eg: Move something from Potion/Clutter/DeadAnimals to Potion/Clutter/Food. Link to comment Share on other sites More sharing options...
Mattiewagg Posted January 16, 2015 Author Share Posted January 16, 2015 Is there a way to change an object's directory in the CK? Eg: Move something from Potion/Clutter/DeadAnimals to Potion/Clutter/Food.http://skyrimmw.weebly.com/skyrim-modding/naming-conventions-skyrim-modding-article See Specific Naming Conventions for info on what you're asking about. Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 16, 2015 Share Posted January 16, 2015 PlayerRef.UnEquipAll() PlayerRef.SetWeight(0) PlayerRef.QueueNiNodeUpdate() I want the above to happen after ShowRaceMenu ends, what can I use? I don't know =/. I only want it to happen once at the start of the game Link to comment Share on other sites More sharing options...
lofgren Posted January 16, 2015 Share Posted January 16, 2015 (edited) If you are using SKSE you can use RegisterForMenu. http://www.creationkit.com/RegisterForMenu_-_Form Edit: I guess you are using SKSE, obviously, since SetWeight() is an SKSE function. Out of curiosity, what happens when you set the player's weight to 0? Edited January 16, 2015 by lofgren Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 16, 2015 Share Posted January 16, 2015 The player's model updates to the lowest possible weight, it can't go below 0 or above 100. Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 16, 2015 Share Posted January 16, 2015 (edited) Function RegisterForMenu(String MenuName) Native Event OnInit() StatusChecks() EndEvent Function StatusChecks() RegisterForMenu("ShowRaceMenu") EndFunction Event OnMenuClose(String MenuName) PlayerRef.UnEquipAll() PlayerRef.SetWeight(0) PlayerRef.QueueNiNodeUpdate() EndEvent Doesn't work by the way. :sad: Scriptname SkyEndWeight extends ObjectReference Actor Property PlayerRef auto Keyword Property Drink auto Keyword Property Food auto GlobalVariable Property FatGainedDay auto GlobalVariable Property DaysWithoutEat auto Float Property CountDrink auto Float Property CountFood auto Float Property Fat auto Function SetWeight(float weight) native float Function GetWeight() native Function QueueNiNodeUpdate() native Keyword Property Vampire auto Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Potion && akBaseObject.HasKeyword(Drink) Fat= FatGainedDay.GetValue() CountDrink=CountDrink+0.5 Fat=Fat+CountDrink FatGainedDay.SetValue(Fat) CountDrink=0 endif if akBaseObject as Potion && akBaseObject.HasKeyword(FOOD) Fat=FatGainedDay.GetValue() CountFood=CountFood+1 Fat=Fat+CountFood FatGainedDay.SetValue(Fat) CountFood=0 endif EndEvent Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime) PlayerRef.UnEquipAll() EndEvent Event OnSleepStop(bool abInterrupted) if PlayerRef.HasKeyword(Vampire)==0 if FatGainedDay.GetValue()>9 FatGainedDay.SetValue(9) PlayerRef.SetWeight(PlayerRef.GetWeight()+FatGainedDay.GetValue()/10) PlayerRef.QueueNiNodeUpdate() FatGainedDay.SetValue(0) endif if FatGainedDay.GetValue()>=7.5 && FatGainedDay.GetValue()<=9 PlayerRef.SetWeight(PlayerRef.GetWeight()+FatGainedDay.GetValue()/10) PlayerRef.QueueNiNodeUpdate() FatGainedDay.SetValue(0) endif if FatGainedDay.GetValue()>=6 && FatGainedDay.GetValue()<=7.5 PlayerRef.SetWeight(PlayerRef.GetWeight()+FatGainedDay.GetValue()/10) PlayerRef.QueueNiNodeUpdate() FatGainedDay.SetValue(0) endif if FatGainedDay.GetValue()>=4.5 && FatGainedDay.GetValue()<=6 ; Any value between 4.5 and 6 means you keep your current weight FatGainedDay.SetValue(0) endif if FatGainedDay.GetValue()>=3.5 && FatGainedDay.GetValue()<=4.5 PlayerRef.SetWeight(PlayerRef.GetWeight()-FatGainedDay.GetValue()/10+0.5) PlayerRef.QueueNiNodeUpdate() FatGainedDay.SetValue(0) endif if FatGainedDay.GetValue()>=2 && FatGainedDay.GetValue()<=3.5 PlayerRef.SetWeight(PlayerRef.GetWeight()-FatGainedDay.GetValue()/10+1) PlayerRef.QueueNiNodeUpdate() FatGainedDay.SetValue(0) endif if FatGainedDay.GetValue()>=0 && FatGainedDay.GetValue()<=2 PlayerRef.SetWeight(PlayerRef.GetWeight()-FatGainedDay.GetValue()/10+2) PlayerRef.QueueNiNodeUpdate() FatGainedDay.SetValue(0) endif if FatGainedDay.GetValue()==0 DaysWithoutEat.SetValue(0) FatGainedDay.SetValue(0) endif endif EndEvent Function RegisterForMenu(String MenuName) Native Event OnInit() StatusChecks() EndEvent Function StatusChecks() RegisterForMenu("RaceSex Menu") EndFunction Event OnMenuClose(String MenuName) MenuName="RaceSex Menu" PlayerRef.UnEquipAll() PlayerRef.SetWeight(0) PlayerRef.QueueNiNodeUpdate() EndEventThis script regulates the player's weight, placed keywords all around the place to make sure it works correctly. Edited January 16, 2015 by Kerberus14 Link to comment Share on other sites More sharing options...
lofgren Posted January 16, 2015 Share Posted January 16, 2015 You don't need to declare the function in the script. You also don't need to set MenuName in the event. MenuName is a parameter that comes from the engine. Are you attaching scripts directly to the player? Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 16, 2015 Share Posted January 16, 2015 Yes, the OnInit event runs so I can confirm the script fires. Link to comment Share on other sites More sharing options...
lofgren Posted January 16, 2015 Share Posted January 16, 2015 Well stop it right now. Move that script onto an alias. Link to comment Share on other sites More sharing options...
Recommended Posts