Results 1 to 16 of 16

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

  1. #1
    Mercenary

    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
    Senior 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
    Mercenary

    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; 10th January 19 at 19:35.

  6. #5
    Senior 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
    Mercenary

    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
    Senior 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
    Mercenary

    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
    Senior 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:


  15. #12
    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.
    The one thing there isn’t one for is if a button has been released for a certain time. Good for if you want to know if a button has been pressed recently.
    I want to know how to do it, seems you need to use runtime or something.

  16. #13
    Senior Support Staff

    User Info Menu

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

    Quote Originally Posted by Fadexz View Post
    The one thing there isn’t one for is if a button has been released for a certain time. Good for if you want to know if a button has been pressed recently.
    I want to know how to do it, seems you need to use runtime or something.
    If you wanted to take an action 5 seconds after a button was pressed...something like this would work.

    Last edited by Batts; 5th February 19 at 12:12.

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


  18. #14
    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
    If you wanted to take an action 5 seconds after a button was pressed...something like this would work.
    How about if a button is pressed within a certain time of another?
    e.g to know if you switch weapon cancel

    Also what is '-='?
    It seems to be minus or if equal to.
    Last edited by Fadexz; 5th February 19 at 21:14.

  19. #15
    Senior Support Staff

    User Info Menu

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

    Quote Originally Posted by Fadexz View Post
    How about if a button is pressed within a certain time of another?
    e.g to know if you switch weapon cancel

    Also what is '-='?
    It seems to be minus or if equal to.

    pressed -= 10;

    same as

    pressed = pressed - 10;

    same with +=



    Similar to double tap ...



    I haven't had a chance to look at the other thing you sent me. Will shortly...
    Last edited by Batts; 5th February 19 at 22:00.

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


  21. #16
    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
    pressed -= 10;

    same as

    pressed = pressed - 10;

    same with +=



    Similar to double tap ...



    I haven't had a chance to look at the other thing you sent me. Will shortly...
    Thanks, I will keep this for when I need it.

Similar Topics

  1. page showing console button variable names?
    By z1haze in forum GPC Library Script Support
    Replies: 1
    Last Post: 11th February 19, 03:45
  2. How do you delay a turbo button?
    By wvnative in forum GPC Script Programming Support
    Replies: 3
    Last Post: 23rd June 18, 17:25
  3. [XBOX ONE] Is it possible to delay the action after pressing a button?
    By akey83 in forum GPC Script Programming Support
    Replies: 4
    Last Post: 28th September 17, 06:03
  4. A button Delay script
    By intheland in forum GPC Script Request
    Replies: 2
    Last Post: 14th August 17, 20:02
  5. Multi step execution with forced delay and extra input block?
    By KS212 in forum GPC Script Programming Support
    Replies: 9
    Last Post: 2nd July 17, 08:56

Posting Permissions

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