Pushing buttons

Player_EPlayer_E Member, PRO Posts: 604
edited November -1 in Working with GS (Mac)
When I push the "z" button I made it so my character throws an iteam every .5 seconds. i have to hold the "z" button down for the whole .5 seconds or else it will not throw the item.

My queation is this. can I make it so when I push and release the "z" button it throws the iteam. basically i want it to be able to throw as fast as you can push the button. i have been messing around with Gs and have not quite figured out how to do it yet.

thanks

p.s. i do not want to just be able to hold down the button and spam throw. i want to make it so you have to let it go

Comments

  • ktfrightktfright Member Posts: 964
    instead of 0.5, make it 0.05. that should do it.
  • Player_EPlayer_E Member, PRO Posts: 604
    the only problem with that is that I do not want to be able to just hold my finger on the button and have it spam.

    think of it this way. i want my button to be like a jump button on an xbox controller. when you hit the button you jump once doesnt matter if you hold your finger on it you only jump once. and when you let go of the button you have to push it to jump a second time.

    My issue here is that i can just hold my finger on the button and I Jump constantly. i do not want this.

    thanks
  • stanimationstanimation Member Posts: 406
    I would make an attribute. So when touched, it does what you want.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Hey,

    create an attribute called "itemHasBeenThrown" (Boolean).

    you can only throw an item when this attribute is FALSE.

    when you throw an item, change this attribute to TRUE.

    then create a rule that says when you release the throw key (when key is UP), set this attribute back to FALSE.

    That should do the trick.

    Hope this helps!
  • Player_EPlayer_E Member, PRO Posts: 604
    Thanks Firemaple!

    got it working how I want it now.
Sign In or Register to comment.