Multiple attacks with one button.

mouae15mouae15 Member Posts: 7
edited December 2011 in Working with GS (Mac)
I was wondering if anybody has an idea on how to make an actor do three different attack animations with only using one button that is being pressed 3 times.

Comments

  • ozboybrianozboybrian PRO Posts: 2,102
    edited December 2011
    Can you give more details? so When button is pressed interger + 1.
    When interger = 1. Animate punch
    = 2 animate kick
    = 3 animate FART in the face lol.

    Create a separate rule that says:
    if is = to 4 or more change interger to 1.

    That what you're after?
  • mouae15mouae15 Member Posts: 7
    yes, i think that is what i'm after. for more details though, i just basically wanted my actor to do combos with one button only.
  • ozboybrianozboybrian PRO Posts: 2,102
    So you mean if it's double tapped it does something different as to pressing it once???... Like mmmm.... That's tricky. I think that's index stuff, ask Tshirt Booth!
  • mouae15mouae15 Member Posts: 7
    Oohh...okay. thanks for letting me know, i haven't tried it yet.
  • calvin9403calvin9403 Member Posts: 3,186
    I will answer this since the god of GS is not here

    here is how you do it

    maks an attribute call tapped? bool false

    when actor touch is press and attribute is false change the attribute to true

    when attribute is true, and touch is press, do something..

    when attribute is true timer 0.4 secs change attribute to false and do something

    so you can use this method for 2 and 3

    Calvin
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited December 2011
    hey there
    First off have a attribute called TapCount and have it set to 0
    Make a rule when touch is pressed:
    Change attribute TapCount to TapCount+1
    Then in that same rule under the change attribute have a timer after .7 seconds run to completion checked,
    change attribute tapCount to 0

    Then have rules in the player when attribute tapCount=1, do attack 1
    When attribute tapCount=2, do attack 2
    and when attribute tapCount=3, do attack 3

    You might have to adjust the .7 to somethign a little bigger like .8 or .9 if you find that the tapCount attribute changes back to 0 too quick and doesnt give you enough time to tripple tap, or change it to something a little smaller if you feel theres to much time alloud to tripple tap

    cheers
  • mouae15mouae15 Member Posts: 7
    Thanks guys for both your inputs, and I am hoping to make the best out of your tips. Thanks and cheers for the success of everyone's games.
Sign In or Register to comment.