Results 1 to 12 of 12

Topic: [PS4 Controller] Double tap in a direction (left or right)

  1. #1
    GOLD NOVA III

    User Info Menu

    [PS4 Controller] Double tap in a direction (left or right)

    I'm looking for help to make script do this: [PS4 Controller]

    Input - Move the analog stick to the right.

    Output - Moves to the right for 100ms, back to center for like 40ms, and then continue to the right until releasing the analog stick.


    Basically I'm trying to get the the effect of double tapping the analog stick to the right but only having to hold the stick the right.

    I'm trying to play an indie side-scroller where in order to run, you need to double tap the direction.

    Any help on this would be amazing.
    Thanks

  2. #2
    The GPC Godfather



    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Quote Originally Posted by fathead2k View Post
    I'm looking for help to make script do this: [PS4 Controller]

    Input - Move the analog stick to the right.

    Output - Moves to the right for 100ms, back to center for like 40ms, and then continue to the right until releasing the analog stick.


    Basically I'm trying to get the the effect of double tapping the analog stick to the right but only having to hold the stick the right.

    I'm trying to play an indie side-scroller where in order to run, you need to double tap the direction.

    Any help on this would be amazing.
    Thanks
    Try this....


  3. The Following 2 Users Say Thank You to Batts For This Useful Post:


  4. #3
    GOLD NOVA III

    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Thanks, can't wait to try this out when I get home.

    Quick question, I'm looking at the script and I'm trying to understand the threshold part.
    Does double tap kick in after 40% to the right and then resets to normal after 60%? So that 20% is where the double tap effect is essentially?

  5. #4
    The GPC Godfather



    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Quote Originally Posted by fathead2k View Post
    Thanks, can't wait to try this out when I get home.

    Quick question, I'm looking at the script and I'm trying to understand the threshold part.
    Does double tap kick in after 40% to the right and then resets to normal after 60%? So that 20% is where the double tap effect is essentially?
    When the stick is pushed past 60% it is reset to 0 for 40 ms then back to current input.

  6. The Following User Says Thank You to Batts For This Useful Post:


  7. #5
    GOLD NOVA III

    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Ah ok, I understand now.

    Thanks again, very much appreciated.

  8. #6
    GOLD NOVA III

    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Hey Batts,

    I got a chance to try the script but I get this error:

    ERROR: A Function with the name 'get_ival' has not been defined


    I tried 'get val' instead and it runs but it doesn't do the double tap effect.

    Any idea of the problem?

  9. #7
    The GPC Godfather



    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Quote Originally Posted by fathead2k View Post
    Hey Batts,

    I got a chance to try the script but I get this error:

    ERROR: A Function with the name 'get_ival' has not been defined


    I tried 'get val' instead and it runs but it doesn't do the double tap effect.

    Any idea of the problem?

    oops that's one of the new ops-code for Zen. Change it to get_val()

  10. The Following User Says Thank You to Batts For This Useful Post:


  11. #8
    GOLD NOVA III

    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    I changed it to get_val but it's not resetting to 0 for 40 ms. It either resets to 0 and stays there or it doesn't reset at all. It's very strange. I tried changing the threshhold and count numbers to higher or lower but the same problem.

    I don't know if this helps but I noticed if I move exactly to the right (no up or down) it does the reset and stays at 0 more, but if I move right with even the slightest bit up or down, it doesn't reset at all.

    Is it possible to set up the script to reset after a set time rather than when it hits certain percent?

    For example, anytime I press right, after 100ms it resets to 0 for 40 ms

  12. #9
    The GPC Godfather



    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Quote Originally Posted by fathead2k View Post
    I changed it to get_val but it's not resetting to 0 for 40 ms. It either resets to 0 and stays there or it doesn't reset at all. It's very strange. I tried changing the threshhold and count numbers to higher or lower but the same problem.

    I don't know if this helps but I noticed if I move exactly to the right (no up or down) it does the reset and stays at 0 more, but if I move right with even the slightest bit up or down, it doesn't reset at all.

    Is it possible to set up the script to reset after a set time rather than when it hits certain percent?

    For example, anytime I press right, after 100ms it resets to 0 for 40 ms
    You would still need some sort of threshold to start tracking time. What I posted works. I increased the reset time to 100ms so it would be a little more obvious. If you watch RX you'll see it flash to 0 then to 100 when I pressed the stick to the right.

  13. The Following User Says Thank You to Batts For This Useful Post:


  14. #10
    GOLD NOVA III

    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    I tried it again on a fresh new script page because I thought maybe my other coding was interfering somehow.

    Every time I run it, when I move to the right and hit 60, it resets to 0 but stays there. As long as it's over 60 it stays at 0. If I release and go below 60 everything goes back to normal.

    The threshold is activating the reset but it's staying at 0 permanently rather than just for the set time.

    I don't know if it matters, but I'm using CronusMAX Plus FW 1.24 and testing with a PS4 controller.

  15. #11
    The GPC Godfather



    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    Quote Originally Posted by fathead2k View Post
    I tried it again on a fresh new script page because I thought maybe my other coding was interfering somehow.

    Every time I run it, when I move to the right and hit 60, it resets to 0 but stays there. As long as it's over 60 it stays at 0. If I release and go below 60 everything goes back to normal.

    The threshold is activating the reset but it's staying at 0 permanently rather than just for the set time.

    I don't know if it matters, but I'm using CronusMAX Plus FW 1.24 and testing with a PS4 controller.
    Change what was get_ival() to get_lval()

  16. The Following User Says Thank You to Batts For This Useful Post:


  17. #12
    GOLD NOVA III

    User Info Menu

    Re: [PS4 Controller] Double tap in a direction (left or right)

    get_lval() did the trick! Works perfectly now.

    Thank you very much for working through the problem with me.

    Have a good one!

  18. The Following User Says Thank You to fathead2k For This Useful Post:


Similar Topics

  1. Fifa 19 - Toggle left stick direction
    By Sando in forum GPC Script Request
    Replies: 0
    Last Post: 16th October 18, 06:29
  2. Right stick in direction up down left right
    By Daddyxx23 in forum GPC Script Request
    Replies: 8
    Last Post: 18th April 18, 17:24
  3. [PS4] Left analog/Double tap HELP
    By anatolian02 in forum GPC Script Programming Support
    Replies: 1
    Last Post: 26th June 17, 03:37
  4. [PS4] Double tap
    By andre2908 in forum GPC Script Request
    Replies: 0
    Last Post: 7th June 17, 08:59
  5. Double Tap A
    By PlayH2 in forum GPC Script Request
    Replies: 14
    Last Post: 1st March 15, 14:55

Posting Permissions

  • You may not post new topics
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •