JPTR1 Posted June 18, 2022 Share Posted June 18, 2022 Good morning! I made a map as an static object hanging on the wall with an activator on it. If the player clicks the activator it disables the static map and adds the map (book form) in the players inventory.Could i add something to the script, so that the player UI opens/reads the map before it gets added to the inventory? Just like if you pick up a book directly with the "read" action. I tried placing the map item somewhere and let it be activated by my trigger, but that was too easy and didn't work. :laugh: Self.GetLinkedRef(LinkedRefKeyword).Activate(Self) - Is there an read command maybe to replace activate? Link to comment Share on other sites More sharing options...
dylbill Posted June 18, 2022 Share Posted June 18, 2022 Yes, Instead of adding to player inventory you can do: BookRef.Activate(Game.GetPlayer()) which makes the Player activate your BookRef Link to comment Share on other sites More sharing options...
JPTR1 Posted June 18, 2022 Author Share Posted June 18, 2022 (edited) Fantastic, "it just works" (realy)Thanks again dylbill! :thumbsup: Maybe do you have an idea for a solution if the reading screen is left with ESC? The note is gone then, my trigger too ofc. It's not a big thing, but probably players want the map keep hanging there, so they leave with ESC. Scriptname MansionTakeFloorMap02B extends ObjectReference {Take the map}ObjectReference Property OrbOfChildhood AutoObjectReference Property ActivatorBox AutoObjectReference Property BookRef AutoEvent OnActivate(ObjectReference akActionRef) OrbOfChildhood.disable() Self.BookRef.Activate(Game.GetPlayer()) ActivatorBox.enable()EndEvent Edited June 18, 2022 by JPTR1 Link to comment Share on other sites More sharing options...
dylbill Posted June 18, 2022 Share Posted June 18, 2022 No Problem. What is the OrbOfChildhood? Is that the map activator? If so, you can re-enable it after the menu closes if the player doesn't have the book in their inventory. For none skse you can use Utility.wait(0.1) to wait till the menu closes. Event OnActivate(ObjectReference akActionRef) OrbOfChildhood.disable() Self.BookRef.Activate(Game.GetPlayer()) ActivatorBox.enable() Utility.wait(0.1) ;wait for book menu to close if Game.GetPlayer().GetItemCount(BookRef) == 0 OrbOfChildhood.enable() Endif EndEventThis won't work if skyrim souls is installed though, cause that unpauses the game during menus. To account for that you can use skse's registerForMenu("Book Menu") and OnMenuClose to detect when the menu closes. https://www.creationkit.com/index.php?title=OnMenuClose_-_Form Be sure to unregisterForMenu in the OnMenuClose event so it only fires once. Link to comment Share on other sites More sharing options...
JPTR1 Posted June 18, 2022 Author Share Posted June 18, 2022 OrbofChildhood in this case is the static map.ActivatorBox enables an XMarker, which removes the trigger as its parent. I see this "Souls mod" is widely spreaded, so maybe to avoid the wait function i could simply let enable a triggerbox(actorzone, with the static map as parent) with the "GetItemCount(BookRef) == 0" check. So everytime the map is taken it will check and re-enable the mapTriggers if it was not taken, when leaving the room for example. Not the most immersive solution, but the result would be fine. Now you wrote some things i never focused on. Is there any point in keeping it "none skse"? I have so much scripts now, how do i know if SKSE is needed? And is SKSE compatible with all Skyrim editions now? Sry i'm realy not into this, if this is escalating the topic just ignore it. Link to comment Share on other sites More sharing options...
dylbill Posted June 18, 2022 Share Posted June 18, 2022 The reason to keep it none skse is if you want to upload your mid to xbox, otherwise using skae shouldnt be a problem. To tell if it requires skse, check the functions and events on the creation kit wiki. It says at the top if it requires skse Link to comment Share on other sites More sharing options...
JPTR1 Posted June 19, 2022 Author Share Posted June 19, 2022 (edited) Much thanks dylbill! Just saw i havn't even installed SKSE right now, so i assume all should be fine. Edited June 19, 2022 by JPTR1 Link to comment Share on other sites More sharing options...
dylbill Posted June 19, 2022 Share Posted June 19, 2022 No problem. Happy Modding :) Link to comment Share on other sites More sharing options...
VampiricEmpress Posted June 26, 2022 Share Posted June 26, 2022 (edited) Anything that can be activated(has a type of prompt to do an action) can be uh activated with Activate(). Doors, books, actors, chests, etc. Edited June 26, 2022 by VampiricEmpress Link to comment Share on other sites More sharing options...
Recommended Posts