MasterAub Posted October 14, 2021 Share Posted October 14, 2021 Hi everyone, I need your help again. I made myself a companion horse. The interaction menu (dismiss, wait, trade, follow) appears on activate.I would like to have it appear on the press of a given key ( let say the "I" key)How do I go about to make this interaction menu appear when I press a given key? Any help is welcome. Thanks here is the script I use: Scriptname AAHorseScript extends ObjectReference DialogueFollowerScript Property DialogueFollower Auto GlobalVariable Property PlayerAnimalCount Auto Message Property DAFollowingMessage Auto ;Actor property dog auto auto state Waiting event onActivate(objectReference AkActivator) ;if player does not have an animal, make this animal player's animal If PlayerAnimalCount.GetValueInt() == 0 (DialogueFollower as DialogueFollowerScript).SetAnimal(self) DAFollowingMessage.show() ENDIF endEvent endState state done endstate In advance thanks for your help Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 14, 2021 Share Posted October 14, 2021 You will first register for the desired key with RegisterForKey and then use the OnKeyDown or OnKeyUp event. Please keep in mind that this requires the use of SKSE64 and for the SKSE64 PSC files to be located where the compiler can access them. One option would be to keep the OnActivate event the way you have it but also use it to register for the key. Then whenever the player presses the appropriate key the menu will appear. You may want to set up some method of allowing the player to change the designated key should they wish to do so. There are a few options here, but one step at a time might be best for now. Link to comment Share on other sites More sharing options...
MasterAub Posted October 15, 2021 Author Share Posted October 15, 2021 Thank you for your help IsharaMeradin. Let me play around with the concept you mentioned and i will get back here to let you know if I managed to make it work. Thanks again Link to comment Share on other sites More sharing options...
Recommended Posts