jdawg7774 Posted January 18, 2015 Share Posted January 18, 2015 Does anyone know how to edit an item that is in your inventory? I have a mod that changes the color of glass weapons and i tried to copy, edit and place it in the world, but when i picked it up it was the vanilla color. Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 18, 2015 Share Posted January 18, 2015 (edited) if akBaseObject as Potion && akBaseObject.HasKeyword(FOOD) && TimeToEat!=0 Fat=FatGainedDay.GetValue() CountFood=CountFood+1 Fat=Fat+CountFood FatGainedDay.SetValue(Fat) CountFood=0 if TimeToEat!=0 debug.Notification("I still feel a little hungry, I should eat a bit more.") endif if TimeToEat==0 debug.Notification("I'm full.") endif endif I want to make this IF run twice, but everytime I call TimeToEat = TimeToEat - 1 I get this error message: SkyEndWeight.psc(37,10): no viable alternative at input 'TimeToEat'. Edited January 18, 2015 by Kerberus14 Link to comment Share on other sites More sharing options...
Mattiewagg Posted January 18, 2015 Author Share Posted January 18, 2015 Â Â Â if akBaseObject as Potion && akBaseObject.HasKeyword(FOOD) && TimeToEat!=0 Fat=FatGainedDay.GetValue() CountFood=CountFood+1 Fat=Fat+CountFood FatGainedDay.SetValue(Fat) CountFood=0 if TimeToEat!=0 debug.Notification("I still feel a little hungry, I should eat a bit more.") endif if TimeToEat==0 debug.Notification("I'm full.") endif endif I want to make this IF run twice, but everytime I call TimeToEat = TimeToEat - 1 I get this error message: SkyEndWeight.psc(37,10): no viable alternative at input 'TimeToEat'.Try TimeToEat -= 1 Link to comment Share on other sites More sharing options...
lofgren Posted January 18, 2015 Share Posted January 18, 2015 Where are you declaring TimeToEat? Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 18, 2015 Share Posted January 18, 2015 (edited) In a OnUpdateGameTime event, TimeToEat-=1 worked though.TimeToEat is a Float Property btw. Edited January 18, 2015 by Kerberus14 Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 19, 2015 Share Posted January 19, 2015 (edited) Â Â Event OnInit()PlayerRef.RegisterForMenu("RaceSex Menu")RegisterForSingleUpdateGameTime(1)WaterPercentage=100FoodPercentage=100EndEvent Event OnPlayerLoadGame()PlayerRef.RegisterFormenu("RaceSex Menu")RegisterForSingleUpdateGameTime(1)EndEvent Event OnMenuClose(String MenuName)Neckdelta=0PlayerRef.GetActorBase().SetWeight(NeckDelta)PlayerRef.UpdateWeight(NeckDelta)EndEvent Event OnUpdateGameTime() WaterPercentage-=25FoodPercentage-=15Debug.Notification(WaterPercentage)Debug.MessageBox(FoodPercentage) if WaterPercentage==75Debug.Notification("I'm getting thirsty, I should drink something.")endifif WaterPercentage==50 && WaterPercentage ==75Debug.Notification("I'm very thirsty.") endifif WaterPercentage==25 && WaterPercentage==50Debug.Notification("I'm getting dizzy.")endifif WaterPercentage==0 && WaterPercentage ==25Debug.Notification("I'm dying to get some water.")endif if FoodPercentage<30Debug.Notification("I'm hungry.")endif RegisterForSingleUpdateGameTime(1) EndEvent This goddamn OnUpdateGameTime event won't run at all unless I load a save.. I don't get why.. OnInit doesn't registerforsingleupdategametimeI wait 1 hour in-game and I don't get either a messagebox or a notification.. @ Any way to use this?http://www.creationkit.com/SetHairColor_-_ActorBase Everything I tried failed, : variable facegen is undefined. ColorForm Properties can't be declared in the properties tab, Form Properties only have two options, nothing I can do! wtfI want to set the hair color of the player to another color.. Edited January 19, 2015 by Kerberus14 Link to comment Share on other sites More sharing options...
lofgren Posted January 19, 2015 Share Posted January 19, 2015 You can't register for updates in game time until after Helgen. I'm not sure how that translates if you are using an alternate start mod. Check out the wiki page for details on exactly when registering for game times updates kicks in if you think that might be an issue. Link to comment Share on other sites More sharing options...
iwonderif Posted January 19, 2015 Share Posted January 19, 2015 (edited) sorry got posted twice somehow Edited January 19, 2015 by iwonderif Link to comment Share on other sites More sharing options...
iwonderif Posted January 19, 2015 Share Posted January 19, 2015 (edited) Hi, just wondering if it is possible to change or disable controls via script (normal or SKSE). For excample dismount no longer on E or mouse klick is no longer attack on certain conditions. I'd like to do somethink like: Event OnKeyDown(Int KeyCode) If (condition && KeyCode == Input.GetMappedKey("something")) disable(something) do my stuff instead EndIf EndEvent Edited January 19, 2015 by iwonderif Link to comment Share on other sites More sharing options...
Kerberus14 Posted January 19, 2015 Share Posted January 19, 2015 (edited) Yes, it is possible, I've researched it because I had to work with it:EnablePlayerControls(Bool abMovement, Bool abFighting, Bool abCamSwitch, Bool abLooking, Bool abSneaking, Bool abMenu, Bool abActivate, Bool abJournalTabs, Int aiDisablePOVType)Enables the specified player controls.DisablePlayerControls(Bool abMovement, Bool abFighting, Bool abCamSwitch, Bool abLooking, Bool abSneaking, Bool abMenu, Bool abActivate, Bool abJournalTabs, Int aiDisablePOVType)Disables the specified player controls.For the record, these are all the things you can enable or disable, you can't disable mounting - You can disable the player's ability to activate the horse, thus disabling his ability to activate it. You can add a script to the horses that checks if the player is a few units close(enough to activate it), then if he is, disable his ability to activate, if he isn't, then enable it with an OnUpdate event. Edited January 19, 2015 by Kerberus14 Link to comment Share on other sites More sharing options...
Recommended Posts