fffseven Posted January 18, 2017 Share Posted January 18, 2017 For testing I duplicate "CraftingBlacksmithArmorWorkbench" and add this script to duplicated one: Scriptname DEL_saasddd extends ObjectReference ;Event OnActivate(ObjectReference akActionRef) Function SomeFunction() RegisterForMenuOpenCloseEvent("CookingMenu") ; Before we can use OnMenuOpenCloseEvent we must register. EndFunction ;EndEvent Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening) if (asMenuName== "CookingMenu") if (abOpening) Debug.Trace("CookingMenu menu is open!") endif endif endEvent and when I compile compiler throw me "RegisterForMenuOpenCloseEvent is not a function or does not exist". What am i missing here? Link to comment Share on other sites More sharing options...
fffseven Posted January 18, 2017 Author Share Posted January 18, 2017 (edited) After more search I am not sure "RegisterForMenuOpenCloseEvent" for skyrim.I think it is specific for Fallout.So any idea how to wait or stop the script until craft menu closes. Edited January 18, 2017 by fffseven Link to comment Share on other sites More sharing options...
cdcooley Posted January 19, 2017 Share Posted January 19, 2017 Yes, that's a Fallout event and there's nothing equivalent for Skyrim (without SKSE). Until SKSE64 is ready you'll have to find some other way to do what you want. Link to comment Share on other sites More sharing options...
fffseven Posted January 19, 2017 Author Share Posted January 19, 2017 (edited) Bethesda should buy SKSE. :smile:I found some useful ways In case any one needs. But they didn't work for me because i change workbench appearance and remove the markers. "IsInMenuMode" is useful for menus which stop game time. But crafting menu happens in game time so you need to "IsFurnitureInUse" or "IsFurnitureMarkerInUse" and there are "onsit"-"ongetup". All of these did't work for me. So I tried to give player an item at the beginnig of crafting menu but i didn't find a way remove this item back.(I didn't find an event for workbench closing state). Now I am trying to migrate crafting menu codes("workBench.Activate(playerRef)") to end of everything. I am new to papyrus, I don't know maybe states what i am looking for. But I am not new to coding and states looks like "labels and gotos" and everyone should avoid to use them. Is that a correct assumption or can states do the job? Edited January 19, 2017 by fffseven Link to comment Share on other sites More sharing options...
lofgren Posted January 19, 2017 Share Posted January 19, 2017 If you are using skse you can registerformenu, similar to fallout 4 (see wiki). If you are not using skse you can put the player in an alias and use the OnGetUp event. Link to comment Share on other sites More sharing options...
fffseven Posted January 19, 2017 Author Share Posted January 19, 2017 Thanks for advice but my workbench has no marker model and I change its apparience with a static book. I think It won't trigger OnGetUP event or I am doing something wrong. I attach the player in quest alias and add a script: Scriptname WorkBenchScript extends ReferenceAlias Event OnGetUp(ObjectReference akFurniture) Debug.Trace("1We just got up from " + akFurniture) Debug.messagebox("2We just got up from " + akFurniture) Debug.notification("3We just got up from " + akFurniture) endEvent I didn't get anything form it. Link to comment Share on other sites More sharing options...
lofgren Posted January 19, 2017 Share Posted January 19, 2017 Yeah, OnGetUp requires that the character actually enters the furniture at some point. I think SKSE will be your only option here. http://www.creationkit.com/index.php?title=RegisterForMenu_-_Form Link to comment Share on other sites More sharing options...
fffseven Posted January 21, 2017 Author Share Posted January 21, 2017 I found a way sort of.Hearthfire uses "BYOHWorkbenchScript" , same thing I want.They use distance between player and activator button of sort.(in my case a npc) When you move away from the object script continue to run. Link to comment Share on other sites More sharing options...
Recommended Posts