Hold Finger to Slide Character

cirovskecirovske Member, PRO Posts: 3
Hey guys I am currently in the process of creating a game. I have three main gestures. Single tap to jump once. Double tap to double jump, and I am trying to create a Hold gesture to get my character to duck and slide. I have the first two working fine but cannot get my character to slide by holding my finger. Can anyone help with this issue?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hello @cirovske Please don't duplicate a thread in mutliple Forums... it's not allowed and is bad practice anyhow. I've deleted the other identical thread to this.

    your question: I'm not sure you can have a hold gesture on the same button as your jumps... as soon as you press the button it'll jump and if you carry on holding, to initiate your character to duck and slide as you would want, it's too late because the character has jumped....

    Maybe consider a separate button for the character to duck and slide?

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    To require a two-second hold:

    When touch is pressed
    .....Change attribute game.touchTime (real) to game.Time
    .....When game.Time > game.touchTime + 2
    ..........[make actor slide]

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • cirovskecirovske Member, PRO Posts: 3
    @gyroscope sorry i thought i deleted the other one! and thanks @tatiang ill give it a try
Sign In or Register to comment.