Can't shoot again after destroying bullet actor

TouchTiltGamesTouchTiltGames Member Posts: 1,162
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

Comments

  • design219design219 Member Posts: 2,273
    What is the code for your shoot action? It seems that must be where the issue is.
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    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 Member Posts: 1,079
    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 Member Posts: 1,162
    Does this only work if game.bulletalive is a boolean? Cause I can't seem to get it to work as an interger.
Sign In or Register to comment.