How Can I Add A Delay To An Action Button

Discussion in 'How Can I...?' started by Foxium, Apr 20, 2017.

  1. Foxium

    Foxium Boxer

    Joined:
    Jan 31, 2017
    Messages:
    43
    Likes Received:
    1
    Hey Guys,

    Working on my game and facing some issues.

    I have an action button that trigger Melee attack when player tap it.

    What I want to achieve is that when the player Taps it, button becomes disabled for 3 seconds. Also while it disabled I want to play an animation for that button that show's to the player how it recharges, how can I achieve that?

    Cheers
     
  2. Foxium

    Foxium Boxer

    Joined:
    Jan 31, 2017
    Messages:
    43
    Likes Received:
    1
  3. Foxium

    Foxium Boxer

    Joined:
    Jan 31, 2017
    Messages:
    43
    Likes Received:
    1
    Not given up yet :) Any ideas?
     
  4. Foxium

    Foxium Boxer

    Joined:
    Jan 31, 2017
    Messages:
    43
    Likes Received:
    1
    Ok last try. Any help?
     
  5. Foxium

    Foxium Boxer

    Joined:
    Jan 31, 2017
    Messages:
    43
    Likes Received:
    1
    Is this a sectet or no one knows :) up
     
  6. blad300

    blad300 Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    515
    Likes Received:
    276
    I don't think is possible, "while is disabled", you can animate it all the time or from time to time (a small move, or something).
    From your UI, where you add the "action button", there are 3 animation possible for UI, Open,Idle,Close.
    Animate your action button, in Idle.
    I will open tomorow BB and if i will figure something else..
     
  7. Foxium

    Foxium Boxer

    Joined:
    Jan 31, 2017
    Messages:
    43
    Likes Received:
    1
    Ok, I see. What I want is basically to avoid melee attack spamming for the player. Maybe its possible then to wait until Attack animation is finished before the next Animation can be performed again? Otherwise it looks ugly if I tap a button, animation will reset and restarts instead of playing it till end.
     
  8. blad300

    blad300 Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    515
    Likes Received:
    276
    Somehow, you must "hack" it, i also need mode specifyc details.
    For example : You have an Action button ,when you press it , it play an animation . at the end of that animation you want button active again .
    You can try : you can charge 1Point per animation, and at the end of animation, reward player with 1P , so while is playing the animation , player doesnt have money, at the end of animation, player have money, so can play animation again.
    This is just an idea. but i think is also something else .
     
  9. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Ya it is kinda pity that the Action Button has the timer function but but does not support refill in seconds, always displays hh:mm:ss to refill and no way to assign a refill animation to it instead.

    Screen Shot 2017-04-30 at 4.52.43 PM.PNG

    @Andy, any plans for improving this in the feature? Like the refill value I expected to be in seconds instead of minutes, respecting the decimals since you can enter that into the field, plus have the ability to select display format (at least few preselect ones) and to be able to assign an animation to it (independently looping or synchronized sprite animation)?
     
  10. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    @trudnai This feature could use a revisit and possible refresh, we can look at it after 2.3 is out.
     
    blad300 likes this.
  11. Foxium

    Foxium Boxer

    Joined:
    Jan 31, 2017
    Messages:
    43
    Likes Received:
    1
    That might solve it. Can you please explain me the steps on how can i achieve this? Thanks
     
  12. sebb121

    sebb121 Boxer

    Joined:
    Dec 10, 2017
    Messages:
    75
    Likes Received:
    56
    Digging this old thread up in hopes that this feature gets added. Thanks!
     

Share This Page