PeterTran Posted April 19, 2017 Share Posted April 19, 2017 (edited) 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 April 19, 2017 by PeterTran Link to comment Share on other sites More sharing options...
Magicockerel Posted April 19, 2017 Share Posted April 19, 2017 I haven't tested this myself, but I would assume "SecondaryAttack". Keep in mind that shavkacagarikia mentioned in this thread that only a few controls work at this point. Link to comment Share on other sites More sharing options...
PeterTran Posted April 19, 2017 Author Share Posted April 19, 2017 (edited) 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 April 19, 2017 by PeterTran Link to comment Share on other sites More sharing options...
shavkacagarikia Posted April 19, 2017 Share Posted April 19, 2017 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 More sharing options...
PeterTran Posted April 19, 2017 Author Share Posted April 19, 2017 (edited) Didn't even know that was an event. I'll give it a shot later tonight and report back. Thanks! EDIT:Haha! It works! Thank you so much shavkacagarikia! Edited April 20, 2017 by PeterTran Link to comment Share on other sites More sharing options...
Recommended Posts