Search Unity

BSD - Button Sequence Detector (Combos)

Discussion in 'Assets and Asset Store' started by LLTools_, Mar 2, 2018.

  1. LLTools_

    LLTools_

    Joined:
    Jun 27, 2015
    Posts:
    7
    BSD - Button Sequence Detector (Combos)



    Create Sequences of buttons for your action or fighting games in a very easy, flexible and efficient way. You can access sequence detection with only one line of code. It can be learned in a few minutes. It does not take away the developer's freedom and does not force him to adapt to a million rules. It does not leave the scripts of your game dependent. The proposal is to be simple to use and friendly to the programmer and game designer. It was developed based on the input requirements of the Street Fighter Series.



    Features:

    - Button Sequence Detector
    - Infinite Sequences that are accessed by name
    - Infinite sequence steps with timings and conditions
    - Flexible input and sequence editor (Designer-Friendly)
    - Button Events (Down, Up, Hold, Released)
    - Axis Criteria (Ex: Vertical is greater than 0.2)
    - Operators Between Button Steps(simultaneous or alternative buttons)
    - Delay Tolerance (That allows for a margin of error, leaving the gameplay more fluid)
    - Anticipation Tolerance (Allows slight changes in the order in which the buttons are pressed, guarantees more fluidity, because humans fail)
    - Uses the Standard Axes of Unity (which avoids adaptations that evade the unity pattern)
    - The sequence execution is accessed with a line, a single function (no complications)
    - Debug the sequences being performed
    - Supports automatic reversal of axis direction based on character direction
    - Supports up to 12 players
    - Virtual Joystick that interferes with the Standart Axes of Unity (which means your game that uses the default input will automatically be implemented for mobile)
    - Designed with performance in mind
    - Playmaker support
    - Corgi Virtual Joystick support

    WebGL Demonstration







    I accept suggestions. Thank you.

    Get it on Asset Store
     
    Last edited: Mar 3, 2018
    DinoBike, bamncan, Gametyme and 2 others like this.
  2. LLTools_

    LLTools_

    Joined:
    Jun 27, 2015
    Posts:
    7
    The first commenters will get this asset for free.
     
    S0M3_N00B_ likes this.
  3. malialis

    malialis

    Joined:
    Feb 4, 2015
    Posts:
    24
    Hello. That is exactly what I have been searching for. This is amazing.
     
    S0M3_N00B_, LLTools_ and leodluz like this.
  4. unity_larD6R8tNGvM-g

    unity_larD6R8tNGvM-g

    Joined:
    Mar 21, 2018
    Posts:
    1
    Dudeee this is awesome, perfect for my game!
     
    LLTools_ likes this.
  5. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Can sequences be derived from more then 1 input device?
     
    Last edited: Mar 28, 2018
    LLTools_ likes this.
  6. leodluz

    leodluz

    Joined:
    Jul 12, 2016
    Posts:
    17
  7. leodluz

    leodluz

    Joined:
    Jul 12, 2016
    Posts:
    17
    there are still 5 free units left
     
  8. Steel-Grin

    Steel-Grin

    Joined:
    Aug 28, 2013
    Posts:
    16
    This sounds really cool! Would love to try it out. Is it easy to set up with Rewired?
     
    LLTools_ likes this.
  9. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Edited my post above, auto correct had messed it up. Just to clarify, is it possible to use two seperate devices in one sequence.
    Eg a combination of keyboard and joystick to create a specific sequence.

    Ps thank you for the voucher will be happy to test it out and give honest feedback.
     
    LLTools_ likes this.
  10. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    I was thinking the same thing about Rewired integration.
     
    LLTools_ likes this.
  11. SanchoP

    SanchoP

    Joined:
    Oct 24, 2016
    Posts:
    27
    Nice kit.
    About Rewired integration. That is a good question.
     
    LLTools_ likes this.
  12. LLTools_

    LLTools_

    Joined:
    Jun 27, 2015
    Posts:
    7
    I did not test with the rewired but it might work because it interferes with the standard axes. I'll send the vouchers to you inbox.
     
  13. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Does purchasing the asset give me the source code? I'd be interested in seeing the scripts of this to see if i can implement it into my existing framework at all. Might help me get diagonals into that framework.
     
    Last edited: May 7, 2018
  14. DrOcto

    DrOcto

    Joined:
    Sep 15, 2017
    Posts:
    79
    Hi, seems very interesting. Is there any copy left for free? I see it works with corgie engine and playmaker. Playmaker will have 1.9 version soon out of beta. Does it support also?
     
  15. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Looks very useful.
     
  16. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    I purchased the asset and all the source code is given. Thank you. I've been able to start working on implementing it into my existing framework. I really enjoy this asset. It's simple to use and understand.

    It would be nice to have more input add-ons supported out of the box instead of just the default Unity one. My preference is Rewired. You can talk to any of the content creators for help on that matter as they have helped me out in the past.

    For the sake of my purposes, I was able to get it set up in the way my system is creating player characters (instantiation). So I had to make some modifications to your add-on so that it could handle instantiation instead of being static.

    I also wanted to let you know that I get a huge performance hit when expanding any of the "sequences" including the config window. When minimized it has no hitch.

    Feel free to reach out to me if you'd be interested in seeing my modifications to fit with my existing framework, primarily changing it from being static to non-static.
     
  17. LLTools_

    LLTools_

    Joined:
    Jun 27, 2015
    Posts:
    7
    Bamncan, How cool, I'm glad you're being helpful. I made it static so that it was ridiculously simple to use. I have not had problems with instance because once you specify the player's number there is no interference. It can control 12 characters simultaneously, each with its dedicated inputs.
     
  18. Branxord

    Branxord

    Joined:
    May 13, 2018
    Posts:
    15
    Hey how can i get this? this loos amazing
     
  19. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
  20. DinoBike

    DinoBike

    Joined:
    Nov 30, 2016
    Posts:
    2
    Awesome! I'm getting it now.
    Want to see if it works with a control rebinder like InControl.
     
  21. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Hi @bamncan,

    Will this work if I'm not using default unity input system?

    Right know I'm using Ultimate Joystick and Ultimate Button (https://assetstore.unity.com/publishers/10612), but in the future maybe I will be using control freak or rewired or some other thing.

    The only change is the way I'm getting the value of my joystick or a button being pushed. I guess it should work, if not with custom functions just changing the BSD scripts should do the trick, but just to confirm before buying it.

    Thanks!
     
  22. waqas_haxhmi

    waqas_haxhmi

    Joined:
    Jun 15, 2016
    Posts:
    15
    hi @bamncan
    Have you integration rewired with it ?
    Is it easily doable ?
     
  23. waqas_haxhmi

    waqas_haxhmi

    Joined:
    Jun 15, 2016
    Posts:
    15
    automatic reversal for axis not working for me
     
  24. Evil-Otaku

    Evil-Otaku

    Joined:
    Oct 17, 2012
    Posts:
    72
    Has anyone attempted to integrate the new Unity Input System? I'd really like to have runtime key remapping
     
  25. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    I need to do a Teleport move like Scorpion from Mortal Kombat. So I need to do a timed sequence of three inputs:
    down - back - hp. Can someone please write that and send me the script thanks.
     
  26. XardyonZyon

    XardyonZyon

    Joined:
    Sep 15, 2015
    Posts:
    5
    How can i get this?
     
  27. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Try this it works for me.
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class KeyCombo : MonoBehaviour
    6. {
    7.     // Specify the keycodes in the inspector
    8.     public KeyCode[] KeyCodeSeries = new KeyCode[] { KeyCode.S, KeyCode.S, KeyCode.P };
    9.  
    10.     // Use this if you want the user to press the series of keys in a given times interval
    11.     public float DelayBeforeReset = 86400; // = One day
    12.  
    13.     // Specify in the inspector the function you want to call
    14.     // after the series have been completed
    15.     public UnityEngine.Events.UnityEvent OnSeriesComplete;
    16.  
    17.     // Specify in the inspector the function you want to call
    18.     // after the series have been failed because a wrong key has been pressed
    19.     public UnityEngine.Events.UnityEvent OnSeriesFailed;
    20.  
    21.     // Specify in the inspector the function you want to call
    22.     // after the series have been failed because the user did not pressed the key before the end of the delay
    23.     public UnityEngine.Events.UnityEvent OnTimeRunnedOut;
    24.  
    25.     // The index in the array of the next key to press in order to continue the series
    26.     private int keyCodeIndex;
    27.  
    28.     // The time (in seconds) the last correct key has been pressed
    29.     private float lastKeyPressTime;
    30.  
    31.     private void Update()
    32.     {
    33.         // Make sure some keys have been specified in the inspector
    34.         if (KeyCodeSeries.Length == 0)
    35.             return;
    36.  
    37.         // Check if the user pressed the key before the end of the timer
    38.         if (Time.time - lastKeyPressTime > DelayBeforeReset)
    39.         {
    40.             keyCodeIndex = 0;
    41.             if (OnTimeRunnedOut != null)
    42.                 OnTimeRunnedOut.Invoke();
    43.         }
    44.  
    45.         // Correct key pressed!
    46.         if (Input.GetKeyDown(KeyCodeSeries[keyCodeIndex]))
    47.         {
    48.             lastKeyPressTime = Time.time;
    49.             keyCodeIndex++;
    50.  
    51.             // Series completed!
    52.             if (keyCodeIndex >= KeyCodeSeries.Length)
    53.             {
    54.                 if (OnSeriesComplete != null)
    55.                     OnSeriesComplete.Invoke();
    56.  
    57.                 // Reset index to allow to start again
    58.                 keyCodeIndex = 0;
    59.             }
    60.         }
    61.         // Wrong key pressed!
    62.         else if (Input.anyKeyDown)
    63.         {
    64.             keyCodeIndex = 0;
    65.             if (OnSeriesFailed != null)
    66.                 OnSeriesFailed.Invoke();
    67.         }
    68.     }
    69. }
    70.  
     
  28. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    547
    @LLTools_ Deprecated asset, can't buy it anymore. Why?
     
    Last edited: Mar 11, 2021
  29. acfung

    acfung

    Joined:
    Jul 27, 2018
    Posts:
    1
    @LLTools_ Is there any way to get this asset anymore? I'd love to buy a copy or can you share the old asset?
     
    avetrux07 likes this.