Button Mashing+Timer

● ARCHIVED · READ-ONLY
Started by HelloHinnie 12 posts View original ↗
  1. I need help(again)!
    I'm trying to make a button mash minigame where the player needs to press a button several times to open a door,but if the time go to 0 the enemy will get to you and it will be a gameover
    I looked for several methods here in the forum and in you tube but none seen to work the way i want!
    I tried following that one,but with the scrypt call for Input.trigger?(Input::C) instead of C is pressed in the condition,but that one don't give me time to press and goes straight to game over!
    index.php
    Help will be very appreciated!
  2. So here is the case
    • You start with the variable value 50
    • Variable is reduced when you don't press the button. It increased otherwise
    • Game is updated at the speed of 60 frames per second. Gives you actually 5/6 second time window (less than one second!)
    • Technically you also need to press the button as fast as 60 times in a second to get positive value
    But wait, while typing this, I just realized you don't even have wait command. That's why it went straight to the failure.
  3. I tried to put in a wait command but it makes the game to just stay still freezed
  4. HelloHinnie said:
    I tried to put in a wait command but it makes the game to just stay still freezed
    How many frame in wait command u put there? And where did u try to insert it?
  5. The balance between variable gain and lose doesn't add up. Variable decreased by 60/second. Do you expect the player to be able to make it up by mashing the button faster than 60 hit/second ? Make it gain 8 or more per mashing. Put the condition for the break loop as var >= target instead of using ==.

    And by wait command, you are supposed to put wait 1 frame before the repeat above. This wait work as the frame update.
    event.PNG

    Also put back the script call condition Input.trigger?(Input::C) or else the player will be able to just hold the button.
  6. I tried to do as you said and it helped but still impossible for the player to win :c
  7. You can try to increase the timing window. For example, starting variable value will be 300 and finish will be at 600, and each tap increase the value by 60, so you need to tap the button around 5 - 10 times

    Edit: fixed the value
  8. then show us the event you have now for us to check for errors.

    However, it's 50/50 if there is an error or if you just have the wrong waits - in the second case you'll have to playtest balancing until you have the correct values.
  9. BsPPdfq.png
    The only problem is that is on my language...
  10. TheoAllen said:
    You can try to increase the timing window. For example, starting variable value will be 300 and finish will be at 600, and each tap increase the value by 60, so you need to tap the button around 5 - 10 times

    Edit: fixed the value
    I'm starting to think that my condition has problem...because it never is a sucess
  11. After re-evaluating back, I realized something else. I assume it is an event in front of the player.
    It has action button trigger, and event triggered by pressing C button, the mash button also C.
    Having a player character in front of event and button mash being C, it means the event will always get reset (maybe?).

    Solution 1: Use different button, for example Input::B
    Solution 2: Activate other event that is autorun.
  12. ^ That can't be the case if you use Input.trigger? for the condition.

    The event looks fine. Is the button actually work? Try put screen flash inside the condition for debug purpose. I don't have VXA with me anymore, so I can't confirm. But isn't the condition for OK button is
    Code:
    Input.trigger?(:C)
    instead of Input.trigger?(Input::C) ? Or is it work the same?

    ONLY IF the conditional script actually doesn't work, I tried simulate button trigger via eventing. Mimicking your current event, it should look like this. (I'm using MV).
    event.PNG
    Should've work the same.