Spawn problem

eurosoniceurosonic Member Posts: 2
edited November -1 in Miscellaneous
Hi im new to GameSalad and have ran into a problem.
Im working on a game with an areoplane when i touch the screen i want to spawn a bomb , sofar this works fine
but the problem is I want to make it so that another bomb cant be droped until the previouse bomb has been distroyed.
If anyone can help me out it will be much apreciated.

Thanks.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Make a boolean attribute called 'Bomb dropped'

    When you press the screen to drop a bomb, you should have the rule:

    If mouse button is down

    Add to this:

    If 'bomb dropped' = false

    Then on the bomb, have this rule:

    If bomb position < 0
    Change bomb dropped to false

    Otherwise
    Change bomb dropped to true

    This will ensure that while the bomb's position is greater than 0, you cannot drop another bomb.

    Hope that helps!

    QS :D
  • eurosoniceurosonic Member Posts: 2
    Thanks this worked great
    problem solved :-)
  • quantumsheepquantumsheep Member Posts: 8,188
    Glad to help! Glad it worked!

    QS :D
Sign In or Register to comment.