Jump to content

[F4SE] What is the "aim down sights" key?


Recommended Posts

I'm working on a simple mod, and for testing I'm writing a script that'll display a message box when the player presses their "aim down sights" button. But I can't figure out which key that corresponds with in the CustomControlMap.txt that comes with F4SE. I tried using "ZoomIn", but that didn't work. Even using the hard keys like "LTrigger" doesn't work on my x360 pad. Any ideas?

Here's what I'm doing, if you need to know:

Scriptname TestScript extends Quest

Event OnQuestInit()
	RegisterForControl("ZoomIn")
endEvent

Event OnControlDown(string control)
	if (control == "ZoomIn")
		Debug.MessageBox("ZoomIn")
	endif
endEvent

This works if I do other buttons such as "Jump", but I can't figure out the ADS button for some reason.
Any help is appreciated!

Edited by PeterTran
Link to comment
Share on other sites

That didn't seem to work either. That's annoying that they don't all work.

Thanks for the help though.

I guess next would be to ask how can I find the list of animation variables to use with

GetAnimationVariableBool

Maybe with that I can figure out if the player is aiming or not and go from there.


EDIT:
I tried to do something a little bit different by registering the animation even, but even that still doesn't work...
It works if I try it with the "JumpUp" event though.

Scriptname TestScript extends Quest

Event OnQuestInit()
	RegisterForAnimationEvent(game.GetPlayer(), "rifleSightedStart")
endEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
	if (asEventName == "rifleSightedStart")
		Debug.MessageBox("rifleSightedStart")
	endif
endEvent
Edited by PeterTran
Link to comment
Share on other sites

 

That didn't seem to work either. That's annoying that they don't all work.

Thanks for the help though.

 

I guess next would be to ask how can I find the list of animation variables to use with

GetAnimationVariableBool

Maybe with that I can figure out if the player is aiming or not and go from there.

 

 

EDIT:

I tried to do something a little bit different by registering the animation even, but even that still doesn't work...

It works if I try it with the "JumpUp" event though.

Scriptname TestScript extends Quest

Event OnQuestInit()
	RegisterForAnimationEvent(game.GetPlayer(), "rifleSightedStart")
endEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
	if (asEventName == "rifleSightedStart")
		Debug.MessageBox("rifleSightedStart")
	endif
endEvent

have you tried sightedStateEnter?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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