• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 104 105 106 107 108 ... 1192 Next »

De-toggle key after activating another key?
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
De-toggle key after activating another key?
07-30-2020, 03:56 AM (This post was last modified: 07-30-2020, 02:26 PM by vladimir520.)
#1
vladimir520 Offline
Junior Member
**
Posts: 6
Threads: 3
Joined: Jul 2020
The title may be a bit vague, so I'm going to go into more detail:

I'm playing Mario Kart Wii. I want to use my Xbox One controller and I have a quirky need in order to get the most out of it. I need the left trigger of the emulated GC controller (BTW I have it set as Standard Controller and I am, as I said, using an Xbox One controller) to only be held from when I press `Shoulder L` on my controller, until I either press 1)`Shoulder L` again OR 2)I activate `Left Y+`/`Left Y-` with a trigger of 90%. Reason for this is that I forget whether `Shoulder L` is toggled or not, and I need something to make sure that it gets reset. It would also be handy since throwing an item would automatically unhold it. If I ignore my last requirement (activating Left Y+/- should stop Shoulder L from being held), the solution is very simple: toggle(`Shoulder L`). De-toggling it by activating other keys though...

I played around with the controls but I don't have any documentation whatsoever on any of the operators/functions. While I understand most of them, others can have quirky behaviour in some situations, which can help me achieve my goal (e.g. toggle(X) goes through a 2-state cycle: on-off, between which it cycles after each pressing of X, while toggle(toggle(X)) goes through a 4-state cycle: on-on-off-off, which is interesting but I don't understand because I don't have a documentation about the behaviour).

Is there a way for me to do this? Or a documentation for me to follow? I heard variables are possible with this, which sounds really promising.



Thanks!
EDIT: Cleaned my text so it's easier to read.
Find
Reply
07-30-2020, 03:15 PM
#2
Craftyawesome Offline
Above and Beyond
*******
Posts: 1,283
Threads: 7
Joined: Mar 2015
toggle() has a parameter for this. toggle(toggle_state_input, [clear_state_input])

The best information I could find is putting the function in with parenthesis and without anything else. You could also look at the source code and go to Source\Core\InputCommon\ControlReference\FunctionExpression.cpp

You should try this:
Code:
toggle(`Shoulder L`, (`Left Y+` > 0.9)|(`Left Y-` > 0.9))
Website Find
Reply
07-30-2020, 03:29 PM
#3
vladimir520 Offline
Junior Member
**
Posts: 6
Threads: 3
Joined: Jul 2020
(07-30-2020, 03:15 PM)Craftyawesome Wrote: toggle() has a parameter for this. toggle(toggle_state_input, [clear_state_input])

The best information I could find is putting the function in with parenthesis and without anything else. You could also look at the source code and go to Source\Core\InputCommon\ControlReference\FunctionExpression.cpp

You should try this:

Code:
toggle(`Shoulder L`, (`Left Y+` > 0.9)|(`Left Y-` > 0.9))
Thanks so much, that worked! I didn't know how to mix them all together. I assumed, wrongly, that clear_state_input was the default value of toggle (which by default would have been 0).
My controller configuration is finally complete!
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode