Prevent Shooting From Holding Down Button.

Discussion in 'How Can I...?' started by Mr Goodcat, Feb 24, 2018.

  1. Mr Goodcat

    Mr Goodcat Boxer

    Joined:
    Jun 10, 2017
    Messages:
    98
    Likes Received:
    28
    Hi Boxers,

    So i've searched the forum for an answer but cant find anything up-to-date.
    Basically as the questions suggests i need to prevent the player from being able to hold the button down to continuously shoot. I need to have the button perform a single shoot Function only.

    Thanks.
     
  2. Marko Njegovan

    Marko Njegovan Boxer

    Joined:
    Jan 9, 2019
    Messages:
    12
    Likes Received:
    3
    Hello, did you found the solution maybe?
     
  3. Shrek

    Shrek Boxer

    Joined:
    Jan 8, 2019
    Messages:
    18
    Likes Received:
    1
    Have you tried using the Action button?
     
  4. Marko Njegovan

    Marko Njegovan Boxer

    Joined:
    Jan 9, 2019
    Messages:
    12
    Likes Received:
    3
    Yes, I figured it out, thanks. :)
     
  5. Shrek

    Shrek Boxer

    Joined:
    Jan 8, 2019
    Messages:
    18
    Likes Received:
    1
    Nice!

    Would you like to share, so that others will learn as well? :)
     
  6. Marko Njegovan

    Marko Njegovan Boxer

    Joined:
    Jan 9, 2019
    Messages:
    12
    Likes Received:
    3
    Of course! :)

    This is the solution that boxer "nyamuk91" gave to me:

    Basically, what you need to do is
    World:
    1. Drag an image file into Buildbox and choose Action when the 'drag and drop wheel' appear. The image doesn't matter
    2. Drag another image file that you want to be your bullet into Buildbox and choose Object when the 'drag and drop wheel' appear.
    3. On the left pane, go to Action that you create from step 1 and click on Action Animation.
    4. In the Action Animation window, on the left pane, find your Bullet object and drag it into the Animation Editor.
    5. Then, you need to create a Spawner component for this object. Add velocity to this object as needed.
    UI:
    1. Create an Action Button
    2. Set the Action attribute for this button to the Action that you created earlier
     
    Shrek likes this.
  7. Shrek

    Shrek Boxer

    Joined:
    Jan 8, 2019
    Messages:
    18
    Likes Received:
    1
    Nice! :)

    It's nice to know that there are certain people/"boxers" who genuinely help. :)
     
    Marko Njegovan likes this.
  8. Marko Njegovan

    Marko Njegovan Boxer

    Joined:
    Jan 9, 2019
    Messages:
    12
    Likes Received:
    3
    Of course! :)
     

Share This Page