Have only one of the Same actor on screen at once.

JtecJtec Member Posts: 2
edited November -1 in Working with GS (Mac)
I have an actor called "Bullet" which spawns from the actor "Player" when the actual player hits space bar. I want to make it to only be able to spawn when the bullet that was first shot has been destroyed, so only one bullet can be on screen at any one time.

Currently the bullet gets destroyed as soon as it leaves screen, so that's fine. I just need to know how to make it stop spawning if there is one on the screen already.

Thanks.

Comments

  • JtecJtec Member Posts: 2
    All Fixed. :D
    I made an Attribute for the scene so whenever a bullet is created it adds one to that attribute and when the bullet is destroyed, it takes one.
    I then made it so bullets will only spawn if that Attribute is set to 0.

    Thanks Anyway. :D
Sign In or Register to comment.