Jump to content

Need of help on my Companion horse interaction menu script


MasterAub

Recommended Posts

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...