Enemy help

I am making a game where to advance to the next level you must defeat all the enemies. On each level there is one more enemy than the last. I have created a method for infinite levels but when i defeat an enemy another one spawns to take its place. I am new to gamesalad. Please help.
P.S. I know it is a program flaw and have tried to fix it with attribute math but cannot

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    It sounds like what you want is When game.enemyCount < game.EnemiesForThisLevel, then spawn a new enemy. In your enemy actor, have Change Attribute game.enemyCount to game.enemyCount+1. You don't have to use an actual attribute for game.EnemiesForThisLevel. You could just have a number there. Be sure to reset game.enemyCount to 0 at the start of each level.

    If you're still having problems, post a screenshot (see instructions in my signature below) of your rules.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • I have a smiler way to have infinite levels but my problem is that enemys spawn immediately after i destroy them.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Put an attribute in your spawn rule that says when enemy count is < the max amount spawn actor and also count them as @tatiang describes and it will stop spawning when the count goes to the max number. Also this video might help in counting them using tags.
  • Correction
    I have a smiler way to have infinite levels but my problem is that enemies spawn again immediately after i destroy them.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited May 2013
    Correction
    I have a smiler way to have infinite levels but my problem is that enemies spawn again immediately after i destroy them.
    How is that a correction? It still sounds like the same issue but you haven't said what you've tried since then or whether our suggestions worked.

    You'll need to post screenshots of your rules.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.