Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Can't shoot again after destroying bullet actor

TouchTiltGamesTouchTiltGames Posts: 1,162Member
edited November -1 in Working with GS (Mac)
I have a Cancel button that destroys a bullet actor when pressed if the bullet is spawned (in the air). This is working great but I can't shoot again after that, how do I go about resetting the ability to shoot again? This is what I have:

Cancel Button:
touch is pressed and game.bulletalive = 1
Change attribute game.bulletalive To: 0

On the Bullet:
Change Attribute: game.bulletalive To: 1
When game.bulletalive = 0
destroy this actor

Thanks in advance


  • design219design219 Posts: 2,273Member
    What is the code for your shoot action? It seems that must be where the issue is.
  • TouchTiltGamesTouchTiltGames Posts: 1,162Member
    Well there's lots lol. Yeah you're right, I probably need to change some attributes that are on the gun on the Cancel button itself...
  • RHRH Posts: 1,079Member
    What design said.

    You probably have the attribute game.bulletalive affecting the ability to spawn (I'm guessing), so when the cancel button changes that it affects the ability for a bullet to spawn.
  • TouchTiltGamesTouchTiltGames Posts: 1,162Member
    Does this only work if game.bulletalive is a boolean? Cause I can't seem to get it to work as an interger.
This discussion has been closed.