ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Crouch/Uncrouch Keybindings (https://www.esoui.com/forums/showthread.php?t=8980)

wesleinwe 02/20/20 08:34 AM

Crouch/Uncrouch Keybindings
 
Hi, is there an addon that allows to use different keys for entering and exiting stealth (crouch) or an addon that just makes the default crouch key to function only to enter stealth, not exit it myloweslife?

Is such an addon even possible to create?

Baertram 02/20/20 12:13 PM

afaik: No, not possible.
One would need to be able to detect if you got into crouch state and then change the keybind somehow (which is not possible via API commands of addons , at least I don't know it would be possible without destroying all other keybinds of the same layer).

And same way as you leave crouch to switch the keybindings back.

ExoY 02/27/20 05:31 PM

I have an Idea how it might be possible to make an addon with the function you desire.

But I am fairly new to writing addons and i need do to some testing to see if my idea works.

Maybe I'll get around to it this weekend. I will let you know how it turns out.

Baertram 02/27/20 05:51 PM

If you manage to get this to work, what others tried and failed several times already, I'd be surprised :rolleyes:
As you said you are new to the addons: Before wasting your time tell us your idea and we can tell you if this is possible or not.

ExoY 02/27/20 06:29 PM

Thats a very good point :)

my idea is based on the assumption, that you can mimic the default crouch hotkey.
Like it is possible for the sheathe/unsheath hotkey with the function: "TogglePlayerWield()".

I spend the last hour looking through some api documentation but i couldnt find such a function so far.

The source code i only understood partly. Crouch is a special movement with the index 2, but didnt find a function to execute or toggle it....

ExoY 02/27/20 06:32 PM

Quote:

Originally Posted by Baertram (Post 40389)
As you said you are new to the addons: Before wasting your time tell us your idea and we can tell you if this is possible or not.

But even if it doesnt work the way i imagined it. It is a good practise to look through all the different documentations out there :)

Baertram 02/27/20 08:09 PM

Quote:

Originally Posted by ExoY (Post 40391)
But even it it doesnt work the way i imagined it. It is a good practise to look through all the different documentations out there :)

Right, that is true.
And no, there is no API function for crouch/uncrouch toggles.
And if there is one it is protected so you cannot abuse it for "botting".

sirinsidiator 02/28/20 04:59 AM

Crouch and other movements are simply that - special move keys. You can find the line of code where it is called by the game here, but OnSpecialMoveKeyPressed is private, so it cannot be used by addons.


All times are GMT -6. The time now is 02:29 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI