First of all, thanks for your concern on this help request of mine
I'm not a native English speaker, so please be advised if my English is a bit messed up or not properly arranged.
I've been modding skyrim for several years, most of them involving patching and editing records in the plugins, but this is actually my first time trying to write a script. Yes, i'm totally new to scripting, and i just learned a bit about papyrus recently (i have no programming background whatsoever, so yeah papyrus is my first scripting language i learnt... just a bit, very very little).
I'm currently trying to make a script about using a "hold key" feature to activate an effect. The effect is higher and further jump effect (i'm involving fJumpHeightMin, fJumpMoveMult, and SpeedMult game settings) which will be triggered when some specific conditions are made. The conditions are:
1. The player must have a specific amount of Stamina in some variable ranges in order for the effect to work (i'm using getBaseAV("Stamina")).
2. The player must wear a specific footwear in order for the effect to work.
3. The player must hold a sneak key to activate the effect (may need to write how many seconds to hold the key, right? please do tell me). Consider that we need to hold the key for at least 1 second. When the player holds the sneak key for 1 second, the character will jump with the new fJumpHeightMin, fJumpMoveMult, and fJumpFallHeightMin game settings.
4. The effect activation will cost some Stamina (so the player will lose that amount of Stamina whenever he/she activate the effect). Lets say, the Stamina cost is 25.
5. A message will pop up on the up left corner of the screen if the player has no enough amount of Stamina to cast the effect.
The effect is part of a magic effect attached into the footwear (in condition 2). So this script will only activate when the player wears that footwear.
I understand that this script requires SKSE, and i'm having no clue on what exactly i should write to make it work as intended. I found OnKeyUp and OnKeyDown forms of SKSE but don't know exactly how to use it.
The amount of variable stamina ranges (condition 1) and the name of the footwear (condition 2) will be written in the following (my roughly unfinished written script):
So, where should i write codes for "holding the key" from SKSE in above script? And what to write? Some helps, examples, or corrections will be appreciated. Thanks in advance
Edited by qwertypol012, 03 January 2019 - 07:51 AM.