Bullets Freeze When "Shoot" Button is pressed.

Shadow_DevelopmentShadow_Development Rocklin, CA. United StatesMember Posts: 85
Hello, I have tried to create a "shoot" button that when pressed, bullets fire from the actor. I have managed to accomplish this, however, the button just stays in place(frozen). It won't even budge. Here are my setttings:

Shoot Button Actor:

Rule:
(Change Attribute) Touch is Pressed
Do:
game.fire to 1
Else:
(Change Attribute) game.fire to 0

Player One Actor:

Rule:
(Attribute) If game.fire = 1

I have watched a few tutorials on YouTube, searched the CookBook, and searched online in general. I have run into absolutely zero discussions related to this problem. I was wondering if anyone could provide me with reasonable assistance with this issue. Once again, I want my bullets to fire without stopping(freezing) in mid place. Any assistance is greatly appreciated. Thank you for your time.

- Shadow_Development

Best Answer

  • quantumsheepquantumsheep Posts: 8,188
    Accepted Answer
    I'd try a timer.

    Your rules would look like:

    Rule:
    (Change Attribute) Touch is Pressed
    Do:
    game.fire to 1
    Timer: After .1 seconds
    (Change Attribute) game.fire to 0

    Nothing in the 'else' section.

    The player 1 actor attributes should stay the same.

    Hope that helps,

    QS =D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.