Something like IsKeyPressed

Post » Mon Jun 18, 2012 2:52 am

Hello all.

My current problem is this: I know there there is no OnKeyPress event or anything similar, but the Papyrus script does seem to let me check for certain actions, such as running or sneaking. However, I need to see whether a certain key (such as the key for strafing right) is pressed. I'm sure it has to be in there somewhere since this is a very basic need, but I've had no luck finding out how so far. Any help?
User avatar
Darlene DIllow
 
Posts: 3403
Joined: Fri Oct 26, 2007 5:34 am

Post » Mon Jun 18, 2012 2:15 am

Bumping, since it's pretty far back there now.
User avatar
Lucie H
 
Posts: 3276
Joined: Tue Mar 13, 2007 11:46 pm

Post » Sun Jun 17, 2012 8:10 pm

As far as I'm aware, something like this isn't currently possible.

Generally speaking, if Bethesda's devs didn't need to do something via scripting, then there won't be a native function for this. For anything in the vanilla game, if it needs to react to player input then the input handling itself will be done by parts of the engine other than the scripting system.

I'm hoping someone can prove me wrong, but I think we need to wait for SKSE for something like this.

Cipscis
User avatar
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Sun Jun 17, 2012 11:16 pm

On this subject of Keypresses and SKSE, is there yet any documentation or anything about scripting with SKSE and the CK. Something like the OBSE wiki page?
I know SKSE has already created a bunch of functions in anticipation of the the new scripting language, but nothing on how to use them.
User avatar
Roberta Obrien
 
Posts: 3499
Joined: Tue Oct 23, 2007 1:43 pm

Post » Mon Jun 18, 2012 4:24 am

I didn't think SKSE had released any new versions since the Creation Kit came out?

Cipscis
User avatar
Emily Jones
 
Posts: 3425
Joined: Mon Jul 17, 2006 3:33 pm

Post » Sun Jun 17, 2012 10:01 pm

Ah well guess I'm with Script Dragon still for now!
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Mon Jun 18, 2012 6:48 am

The SKSE team said (edit: http://www.gamesas.com/topic/1344794-questions-regarding-skse-skyrim-script-extender/page__view__findpost__p__20269566) over in the Mod forum that all the functions they've added so far are for dealing with the UI and Scaleform, and that they were still looking over the CK to see how to go about adding Papyrus extensions, and what needed to be added.

And yes, as far as I can tell, an OnKeyPress event or the like would need to be added by a script extender.
User avatar
Gen Daley
 
Posts: 3315
Joined: Sat Jul 08, 2006 3:36 pm

Post » Sun Jun 17, 2012 6:08 pm

Hm... I'd love to find a way to do this with the current creation kit, especially if SKSE is behind in some way that makes it unusable at the moment. Also I've never messed with that, either, so the lack of documentation would definitely hurt. I've been trying to think of another way to do this, some way that does not involve listening for a particular keystroke, but nothing yet... there are instances where the player's actions become something else, like with the werewolf transformation, so I'm combing through that code in hopes of finding some instance where the designers had to listen for a certain keystroke. It's unlikely since so far they've just been script-equipping various spells and abilities to simulate the change in functionality, but I'm still hopeful.
User avatar
JUDY FIGHTS
 
Posts: 3420
Joined: Fri Jun 23, 2006 4:25 am

Post » Sun Jun 17, 2012 9:46 pm

How about using Script Dragon to catch keypresses and store the information in some Gamesetting or spare Actor Value, if there are such things? Then your regular non-SD mod could read that Gamesetting or AV to see what it was.
User avatar
jodie
 
Posts: 3494
Joined: Wed Jun 14, 2006 8:42 pm

Post » Mon Jun 18, 2012 1:20 am

If it worked, that'd be pretty brilliant, pananacakes.

Maybe the mod could be an esm that the non-SD mod would be an esp for.
User avatar
James Hate
 
Posts: 3531
Joined: Sun Jun 24, 2007 5:55 am


Return to V - Skyrim