Anyone had any luck grabbing keystrokes?

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Ginger470
Posts: 158
Joined: Sun, 20. Jun 04, 03:24
x2

Anyone had any luck grabbing keystrokes?

Post by Ginger470 »

All the keys are defined, but I can't quite figure out how they're passed... anyone figured it out yet? Thanks.
User avatar
Observe
Posts: 5336
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Currently, we do not have access to capturing keyboard events other than those associated with the command menu - which is what some of us have been using for command extensions (example my targeting mod), and also a few keys that can be captured with MD/AI code (example Next Weapon).

This may change if/when we have better access to the UI files.
FuzzyLogic
Posts: 76
Joined: Thu, 8. Mar 07, 12:46
x4

Post by FuzzyLogic »

If I get this right it means that direct weapon selection via number keys is out of the question for now?
Was just about to put in a mod request for that :roll:
User avatar
Observe
Posts: 5336
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

FuzzyLogic wrote:If I get this right it means that direct weapon selection via number keys is out of the question for now?
Correct. There is currently no way to grab those keyboard events. We are limited to keys 1-6 using command menu coding, or several other keys that have events in Mission Director and AI code, but these are already assigned to certain functions.
Ginger470
Posts: 158
Joined: Sun, 20. Jun 04, 03:24
x2

Post by Ginger470 »

Thanks for the info.

@Observe: thanks for all your hard work. I'm currently dissecting your mods and using them as the stackoverflow.com of the Rebirth world :)

I got the menu thing working (pity there aren't more than 6 slots, makes for some deep nesting). Clumsy, but I could go with it for my purposes.

Reason I ask is I need to pan around the cockpit -- I've got code that'll do this, but no real way to control it (http://forum.egosoft.com/viewtopic.php?t=355103)

The reason I'm trying to look around is I'd like to try to place some of the interactive elements (eg the door switches) in the cockpit to see if 1. it's possible and 2. whether you can click on them.

If they are placeable and working, then they may be disectable, giving us the ability to make a clickable cockpit.

But first step is to be able to see if/where they get placed.

Return to “X Rebirth - Scripts and Modding”