Fose function for setting hotkeys?

Post » Tue May 17, 2011 5:28 am

I have a scripted section where the players items are all removed, and they are equipped with some gear. I would like to hotkey the two weapons they get, as access to the pipboy is turned off for the time being. Can this be done? All I can find is a FOSE function to get what item is hotkeyed in what place, but can you actually set an item to be hotkeyed? Thanks.

Gunmaster95
User avatar
Josh Lozier
 
Posts: 3490
Joined: Tue Nov 27, 2007 5:20 pm

Post » Tue May 17, 2011 3:24 am

There is no "SetHotkeyItem" function. The closest thing you can do at the moment is set up a couple of scripted hotkeys. You can use the default hotkeys for this, but if the player holds them down to see what items are hotkeyed, the items won't be shown in the wheel like they usually would.

Cipscis
User avatar
herrade
 
Posts: 3469
Joined: Thu Apr 05, 2007 1:09 pm

Post » Tue May 17, 2011 12:38 pm

Scripted hotkeys are fine. The time when this is needed is mostly controlled anyway. They cant open their pip boy, leave a certain area, or do really anything but run around killing stuff. Then at a certain point they get all their stuff back and are free to wander again. So how would I go about making some scripted hotkeys? That would be more than fine. :)
User avatar
Ella Loapaga
 
Posts: 3376
Joined: Fri Mar 09, 2007 2:45 pm

Post » Tue May 17, 2011 5:34 am

You are likely looking for http://fose.silverlock.org/fose_command_doc.html#GetKeyPress and http://fose.silverlock.org/fose_command_doc.html#IsKeyPressed. There are a number of other functions to detect if keys are disabled or enabled. Instead of using keys, you may also want to detect if a given control (such as Attack) is being pressed by using http://fose.silverlock.org/fose_command_doc.html#IsControlPressed.
User avatar
Peter P Canning
 
Posts: 3531
Joined: Tue May 22, 2007 2:44 am

Post » Tue May 17, 2011 12:54 pm

I've got a tutorial available for this sort of thing on my website - http://www.cipscis.com/fallout/tutorials/detecting_keypresses.aspx

Cipscis
User avatar
Lily Something
 
Posts: 3327
Joined: Thu Jun 15, 2006 12:21 pm


Return to Fallout 3