• 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 ... 66 67 68 69 70 ... 1133 Next »

Creating a conditional input
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Creating a conditional input
03-30-2020, 02:55 AM
#1
FelinaLain Offline
Junior Member
**
Posts: 7
Threads: 2
Joined: Dec 2018
Hello all, I've been trying to map a conditional input, so Dolphin register the input only if I move my mouse a certain speed

I figured I'd have to use the If function, but beyond the start of it, I'm a bit stumped
What am I supposed to put as the true_expression and false_expression?

This is my current function, missing the true and false

if(`DInput/0/Keyboard Mouse:Axis X-`|`DInput/0/Keyboard Mouse:Axis X+`>1, , )

I know what true and false are FOR, but I don't know, in dolphin case, how I'm supposed to write them, and googling various things (like dolphin function input, or dolphin if input) yielded no infos

Anyone know what I need to put in there to make it work?

thanks in advance!
Find
Reply
04-02-2020, 07:32 AM
#2
FelinaLain Offline
Junior Member
**
Posts: 7
Threads: 2
Joined: Dec 2018
Update: I tried putting a simple "true" and "false" in the respective spaces, but it still didn't work

I'm still no closer to solving this :c
Find
Reply
04-02-2020, 01:32 PM (This post was last modified: 04-02-2020, 01:41 PM by Rusty Potato.)
#3
Rusty Potato Offline
Junior Member
**
Posts: 34
Threads: 1
Joined: Feb 2019
(03-30-2020, 02:55 AM)FelinaLain Wrote: Hello all, I've been trying to map a conditional input, so Dolphin register the input only if I move my mouse a certain speed

I figured I'd have to use the If function, but beyond the start of it, I'm a bit stumped
What am I supposed to put as the true_expression and false_expression?

This is my current function, missing the true and false

if(`DInput/0/Keyboard Mouse:Axis X-`|`DInput/0/Keyboard Mouse:Axis X+`>1,  ,  )

I know what true and false are FOR, but I don't know, in dolphin case, how I'm supposed to write them, and googling various things (like dolphin function input, or dolphin if input) yielded no infos

Anyone know what I need to put in there to make it work?

thanks in advance!

As far as I know, true_expression is what's used if the condition is true and false_expression is what's used if the condition is false (like an if/else statement).

For example:
if(`Shoulder L`, 18.00, 72.00)
Will pass through 18 as a value if Shoulder L is pressed and pass through 72 if Shoulder L isn't pressed.

Anyway, maybe something like this on each of the axes will work? (I don't know what you're using it for, of course, so adjust as needed)
if(`DInput/0/Keyboard Mouse:Axis X-` > 0.5, `DInput/0/Keyboard Mouse:Axis X-`, 0)

Don't know if it'll work for what you're doing, but hopefully this helps.

Edit: Found a conditional to make the inputs less stiff, since slight movements on one axis during strong movements on the other axis weren't reading:
(`DInput/0/Keyboard Mouse:Axis X-` > 0.5 | `DInput/0/Keyboard Mouse:Axis Y-` > 0.5 | `DInput/0/Keyboard Mouse:Axis Y+` > 0.5)
Find
Reply
04-02-2020, 07:00 PM
#4
FelinaLain Offline
Junior Member
**
Posts: 7
Threads: 2
Joined: Dec 2018
(04-02-2020, 01:32 PM)Rusty Potato Wrote: As far as I know, true_expression is what's used if the condition is true and false_expression is what's used if the condition is false (like an if/else statement).

For example:
if(`Shoulder L`, 18.00, 72.00)
Will pass through 18 as a value if Shoulder L is pressed and pass through 72 if Shoulder L isn't pressed.

Anyway, maybe something like this on each of the axes will work? (I don't know what you're using it for, of course, so adjust as needed)
if(`DInput/0/Keyboard Mouse:Axis X-` > 0.5, `DInput/0/Keyboard Mouse:Axis X-`, 0)

Don't know if it'll work for what you're doing, but hopefully this helps.

Edit: Found a conditional to make the inputs less stiff, since slight movements on one axis during strong movements on the other axis weren't reading:
(`DInput/0/Keyboard Mouse:Axis X-` > 0.5 | `DInput/0/Keyboard Mouse:Axis Y-` > 0.5 | `DInput/0/Keyboard Mouse:Axis Y+` > 0.5)

Aaaah thanks that worked!
That's the part I was missing, the idea of putting the input as a true or false, and the 0 for false
Thanks tons!
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