Recent posts by krinsmnite on Kongregate

Flag Post

Topic: Game Programming / Asking for feed back on game preview

Maybe if you shrank the paddle and gave the bombs a further distance to fall, it would make the game slightly easier. As it is now, I feel like I don’t have enough time to move between the bombs and get the pick ups.

 
Flag Post

Topic: Game Programming / Game ignoring my if statement

Wow. Nevermind. I forgot that I had to declare spawnRate as _root.ship.spawnRate on the buttons.
So frustrating. :D

 
Flag Post

Topic: Game Programming / Game ignoring my if statement

I’m trying to set difficulty. The harder the game, the more frequent the spawns. I set it up to use a timer that adds one every frame, and compares it to spawnRate. if the timer is higher, it spawns an enemy. Variables are set correctly, but its ignoring my if then statement.

In the onLoad, I have:

_root.GameMenu.hard.onPress = function()
{
spawnRate = 30;
}

_root.GameMenu.normal.onPress = function()
{
spawnRate = 45;
}

_root.GameMenu.easy.onPress = function()
{
spawnRate = 60;
}
enemytimer = 0;

In the onEnterFrame I have:
enemytimer += 1;
if (enemytimer > spawnRate)
{
enemytimer = 0;
var enemy = _root.attachMovie( “EnemyShip” , “EnemyShip” + _root.getNextHighestDepth(), _root.getNextHighestDepth() );
enemies.push(enemy);
}

Debug is showing the enemytimer skyrocket while spawnRate is set correctly. I don’t see how that could happen when I clearly have an if then statement.