BarnsleyLad Posted January 31, 2021 Posted January 31, 2021 Hey everyone! As the title suggests, I am looking to check the value of an animation variable while I am in game... is there a console command for this?? Speaking specifically, I am looking to check the value of bIsRiding... It seems that if the player fast travels to another world space (Tamriel to Whiterun World for example) while they are mounted, the value of bIsRiding stays true, even though they are no longer on horseback... I would just like to check if this is the case, wondered if you guys had a solution! As always, many thanks :D
dylbill Posted January 31, 2021 Posted January 31, 2021 Hey, it doesn't look like there's a console command for this, but there is a papyrus script function. To check, you can make a new mod, make a new quest in it that's start game enabled and put this script on it. Scriptname TM_QuestScript extends Quest Event OnInit() RegisterForKey(42) ;left shift EndEvent Event OnKeyDown(Int keyCode) Debug.MessageBox(Game.GetPlayer().GetAnimationVariableBool("bIsRiding")) EndEventIt will show true or false when you press the left shift key. To change keys change 42 to another scan code: https://www.creationkit.com/index.php?title=Input_Script#DXScanCodes Note this does require skse. To not use SKSE you can do this: Scriptname TM_QuestScript extends Quest Event OnInit() Utility.Wait(1) Debug.MessageBox(Game.GetPlayer().GetAnimationVariableBool("bIsRiding")) EndEvent But that will only run once when the mod is first loaded. To have it run again you can use the console command StopQuest <QuestID> followed by StartQuest <QuestId>, the QuestID being the quest id that you put the script on.
BarnsleyLad Posted February 1, 2021 Author Posted February 1, 2021 Hey, it doesn't look like there's a console command for this, but there is a papyrus script function. To check, you can make a new mod, make a new quest in it that's start game enabled and put this script on it. Scriptname TM_QuestScript extends Quest Event OnInit() RegisterForKey(42) ;left shift EndEvent Event OnKeyDown(Int keyCode) Debug.MessageBox(Game.GetPlayer().GetAnimationVariableBool("bIsRiding")) EndEventIt will show true or false when you press the left shift key. To change keys change 42 to another scan code: https://www.creationkit.com/index.php?title=Input_Script#DXScanCodes Note this does require skse. To not use SKSE you can do this: Scriptname TM_QuestScript extends Quest Event OnInit() Utility.Wait(1) Debug.MessageBox(Game.GetPlayer().GetAnimationVariableBool("bIsRiding")) EndEvent But that will only run once when the mod is first loaded. To have it run again you can use the console command StopQuest <QuestID> followed by StartQuest <QuestId>, the QuestID being the quest id that you put the script on.That is a pretty good idea, thanks! I never thought to make another mod to make the check, I appreciate the help!
dylbill Posted February 1, 2021 Posted February 1, 2021 No problem :) I have a test mod esp I use for simple things like this. Good luck!
Recommended Posts