Results 1 to 11 of 11

Topic: Need help with having a variable/adjustable delay per button before execution method

  1. #1
    Renegade

    User Info Menu

    Need help with having a variable/adjustable delay per button before execution method

    I would greatly appreciate any help with this... I'm trying to create a combo run method where you have to hold a button for a defined period of time before the combo will execute. The hold period though will differ per button... I've managed to somewhat nut out a method that seems to work, but the problem I'm running into is when I copy the block of code to reuse for another button, it fails to compile...

    What am I actually doing wrong? Since the first block works I'd assume that literally just copying it 'as is' should allow for repetition... Unless this isn't the case.

    Any help will be appreciated.


  2. #2
    Support Staff

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Quote Originally Posted by KS212 View Post
    I would greatly appreciate any help with this... I'm trying to create a combo run method where you have to hold a button for a defined period of time before the combo will execute. The hold period though will differ per button... I've managed to somewhat nut out a method that seems to work, but the problem I'm running into is when I copy the block of code to reuse for another button, it fails to compile...

    What am I actually doing wrong? Since the first block works I'd assume that literally just copying it 'as is' should allow for repetition... Unless this isn't the case.

    Any help will be appreciated.
    The code is formatted very different to what I like but it seems to are adding a toggle (!) for every single button which is different to what i've seen before.
    I would recommend doing it the easy way and doing the below.


  3. #3
    Support Staff

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Quote Originally Posted by KS212 View Post
    I would greatly appreciate any help with this... I'm trying to create a combo run method where you have to hold a button for a defined period of time before the combo will execute. The hold period though will differ per button... I've managed to somewhat nut out a method that seems to work, but the problem I'm running into is when I copy the block of code to reuse for another button, it fails to compile...

    What am I actually doing wrong? Since the first block works I'd assume that literally just copying it 'as is' should allow for repetition... Unless this isn't the case.

    Any help will be appreciated.

    You have to change the combo name to a different name and one that has been defined. Looks like combo5 and combo7 are the ones being used, so use 1 thru 4, or 6.

    - - - Updated - - -

    Quote Originally Posted by Fadexz View Post
    The code is formatted very different to what I like but it seems to are adding a toggle (!) for every single button which is different to what i've seen before.
    I would recommend doing it the easy way and doing the below.

    That from Excalibur's Script manipulator. It's reading the combo out of the data section. If you change to that it's not gonna work.

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


  5. #4
    Renegade

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    @All
    Thank you for your replies. I forgot to mention that I am NOT a coder or programmer and I know literally nothing about coding. So if the code looks like monkey shit, well... probably coz it is :P


    Quote Originally Posted by Batts View Post
    You have to change the combo name to a different name and one that has been defined. Looks like combo5 and combo7 are the ones being used, so use 1 thru 4, or 6.


    That from Excalibur's Script manipulator. It's reading the combo out of the data section. If you change to that it's not gonna work.
    I'm not sure what you mean but that's what I want it to do... I want it to read combo data if the button is held for X amt of time. What I'm trying to do is have the initial button press execute its mapped input within the game (whatever it is) and then if the button is held, execute combo data... the combo data is of course written such that is will continue off the initial input.


    Quote Originally Posted by Fadexz View Post
    The code is formatted very different to what I like but it seems to are adding a toggle (!) for every single button which is different to what i've seen before.
    I would recommend doing it the easy way and doing the below.

    What I'm trying to achieve is to have the main buttons on the PS4 pad usable for combo execution simply by holding them for a defined amount of time. What is important however is that the time definition must be independant per button.

    Here's a 'game' example for why I'm trying things this way instead of a normal method. Lets take Street Fighter 5 for example, using Ryu:

    A basic combo for him is MP, link to MP, cancel to Ex Jodan, then wait a bit and Shoryuken (this is the Combo5 data, minus the first MP).

    I've got it timed so that if you press MP (default Triangle), you get the in-game response as per normal... if you HOLD the button, after the defined delay which is timed so that it will execute RIGHT as the first MP lands, it will 3frame link into the rest of the combo. If the initial MP was blocked, just... don't hold the button and you're safe. It ALSO has to work in the way that if you let go of the combo button halfway through for any reason, it will stop the combo and pressing+holding again will restart the playback from beginning.

    All that being said I'm not quite sure how to use your example, can you please explain a bit further?
    Last edited by KS212; 1 Week Ago at 19:35.

  6. #5
    Support Staff

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Quote Originally Posted by KS212 View Post
    @All
    Thank you for your replies. I forgot to mention that I am NOT a coder or programmer and I know literally nothing about coding. So if the code looks like monkey shit, well... probably coz it is :P




    I'm not sure what you mean but that's what I want it to do... I want it to read combo data if the button is held for X amt of time. What I'm trying to do is have the initial button press execute its mapped input within the game (whatever it is) and then if the button is held, execute combo data... the combo data is of course written such that is will continue off the initial input.




    What I'm trying to achieve is to have the main buttons on the PS4 pad usable for combo execution simply by holding them for a defined amount of time. What is important however is that the time definition must be independant per button.

    Here's a 'game' example for why I'm trying things this way instead of a normal method. Lets take Street Fighter 5 for example, using Ryu:

    A basic combo for him is MP, link to MP, cancel to Ex Jodan, then wait a bit and Shoryuken (this is the Combo5 data, minus the first MP).

    I've got it timed so that if you press MP (default Triangle), you get the in-game response as per normal... if you HOLD the button, after the defined delay which is timed so that it will execute RIGHT as the first MP lands, it will 3frame link into the rest of the combo. If the initial MP was blocked, just... don't hold the button and you're safe. It ALSO has to work in the way that if you let go of the combo button halfway through for any reason, it will stop the combo and pressing+holding again will restart the playback from beginning.

    All that being said I'm not quite sure how to use your example, can you please explain a bit further?
    To activate a combo based on a button being pressed for a specific time....

    if(get_val(<button> && get_ptime(<button> > time_for_combo_activation)
    i = get_combo_index(<combo_name>;

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


  8. #6
    Renegade

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Quote Originally Posted by Batts View Post
    To activate a combo based on a button being pressed for a specific time....

    if(get_val(<button> && get_ptime(<button> > time_for_combo_activation)
    i = get_combo_index(<combo_name>;
    That seems almost too simple x.x

    I'll give it a shot after work. Thanks a lot

    With my method, it worked but I couldn't get the code to compile for another button... If your method is seriously all that's needed then sheesh I was trying to do it all the hard way...

  9. #7
    Support Staff

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Quote Originally Posted by KS212 View Post
    That seems almost too simple x.x

    I'll give it a shot after work. Thanks a lot

    With my method, it worked but I couldn't get the code to compile for another button... If your method is seriously all that's needed then sheesh I was trying to do it all the hard way...
    Your combo activations need to be in this section..

    // EDIT THIS PART OF SCRIPT for combo run ---------------------------
    //////////////////////////////////////////////////////////////////////////

  10. #8
    Support Staff

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Quote Originally Posted by Batts View Post
    You have to change the combo name to a different name and one that has been defined. Looks like combo5 and combo7 are the ones being used, so use 1 thru 4, or 6.

    - - - Updated - - -



    That from Excalibur's Script manipulator. It's reading the combo out of the data section. If you change to that it's not gonna work.
    My bad, i'm not familiar with data.
    I'll be quiet.

  11. #9
    Babyfaced Assassin

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met


  12. #10
    Renegade

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Tested it out, works great. Thanks a lot... I was SERIOUSLY overthinking it, ugh. Didn't know there was a get_ptime variable.

  13. #11
    Support Staff

    User Info Menu

    Re: Need help with having a variable/adjustable delay per button before execution met

    Quote Originally Posted by KS212 View Post
    Tested it out, works great. Thanks a lot... I was SERIOUSLY overthinking it, ugh. Didn't know there was a get_ptime variable.
    Yep. Check the User's Manual. It has a full listing of all GPC commands along with examples.

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


Similar Topics

  1. How do you delay a turbo button?
    By wvnative in forum Macro & Script Programming Support
    Replies: 3
    Last Post: 23rd June 18, 17:25
  2. 2nd Try. Does anyone have a button box using the Zero Delay adapter? Working?
    By BeardedPatriot in forum DriveHub Hardware Support
    Replies: 6
    Last Post: 13th December 17, 08:03
  3. A button Delay script
    By intheland in forum Script Request
    Replies: 2
    Last Post: 14th August 17, 20:02
  4. Multi step execution with forced delay and extra input block?
    By KS212 in forum Macro & Script Programming Support
    Replies: 9
    Last Post: 2nd July 17, 08:56
  5. Adjustable parameter button hold, Please help :(
    By tehorza in forum Macro & Script Programming Support
    Replies: 1
    Last Post: 8th January 17, 12:13

Posting Permissions

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