This site requires JavaScript, please enable it in your browser!
Greenfoot back
Programmer1998
Programmer1998 wrote ...

2015/4/6

Spawning Glitch?

Programmer1998 Programmer1998

2015/4/6

#
I have a code where I spawn my Boss when my player has collected 25 coins, but there is a glitch when the Boss appears in the game? I'm not really sure what went wrong! Can someone check if there is anything wrong with my code?
    public void spawnEnemy()
    {
        if(Player.coinsCollected_ == 25)
        {
            Enemy boss = new Enemy();
            addObject(boss, 1000, 340);
            bossMusic.playLoop(); //starts the new music 
            Music.stop(); //stops the original music to play bossfight music
        }
    }
jdf1234567 jdf1234567

2015/4/19

#
What's happening and is there an error?
xWanna xWanna

2015/4/19

#
What kind if glitch is it? And I would the Music lines.
jdf1234567 jdf1234567

2015/4/19

#
Have you tried doing it without the Music?
You need to login to post a reply.