How can I make a hold button?

Discussion in 'How Can I...?' started by dani_atrom, Mar 23, 2016.

  1. dani_atrom

    dani_atrom Boxer

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes Received:
    0
    Both questions are for BB 1.3.6:
    How can I make an action button to perforn that specific action for the whole period of time WHILE it is pressed, rather that every time it is pressed?
    And how can I make a specific action to end when the character leaves the level/room in which the action was?
     
  2. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,811
    Likes Received:
    1,024
    can you give an example... if you hold down a fire button, it fires the whole time you hold it down, but I'm not sure this is what you are asking.
     
  3. dani_atrom

    dani_atrom Boxer

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes Received:
    0
    Yea, my game is something like this(check the image):

    The character is the white circle and it constantly moves upwards. You have two buttons(left and right sides of the screen), one(left side) changes the character to be green, and the other one(right side) changes the character to red. The red/green ribbons kill the character if when it passes through them it has the opposite color.

    Now, from what I know it is not possible to change the enemies of a character by pressing a button (if it is possible please tell me how).

    So I came up with the idea of making each ribbon in a different room(you know that 1,2,3,4, etc. on the bottom of the BB interface) and in each room place 2 buttons: one that make the character invulnerable and changes it's color to red/green depending on what color has the ribbon in that room, and one that makes it vulnerable(I don't know if that is possible, please tell me if you know how to) and changes the color to the opposite.

    But I can't make that effect happen for a specific period of time because it could be invulnerable and colored as red when it passes a green area, or the effect could end before it finishes to pass the ribbon. So I needed to change a bit the gameplay to: WHILE a button is pressed the character has the color of that button and it is invulnerable/vulnerable depending on what color is that room's ribbon. Now is my problem with that hold button, from what I tested an action button takes effect only when you release it, and has no effect while you hold it, How can I change that?

    If any of the two options (hold button, or change the enemies of a character) would be possible in BB 1.3.6 or BB 2.0 please let me know, although I would prefer a solution for BB 1.3.6.

    Thanks for reading all the way to here. I promise to return the favor someday.
     

    Attached Files:

Share This Page