
-----------------------------------
Wasabicheese
Tue Jun 02, 2009 1:58 pm

help with summative, due tomorrow
-----------------------------------
My Game keeps freezing when you kill an enemy, and doesnt unfreeze until after you move. Can you guys help?

-----------------------------------
Diablo117
Tue Jun 02, 2009 4:14 pm

Re: help with summative, due tomorrow
-----------------------------------
In addition to that, your collision detection is off. 

In response to your "freezing" it is in fact not really freezing :P
This part of the code is run if the blast is to the right of the screen, as the blast keeps moving and is not reset, the blast will always be past the right hand side of the screen until you move. In your movement part of code, you increase the blast X and Y, making the program run again. 

        if blastX (1) >= MonsterX (1) - movecount and blastX(2) = MonsterY (1) - movecount and blastY(2)  0 and MonsterX (2) >= 0 then
        CharacterY (1) -= Speed
        %blastX (1) := CharacterX (1) + 11
       % blastY (1) := CharacterY (1) + 11

    if chars (KEY_UP_ARROW) and hp > 0 and MonsterX (2) >= 0 then
        CharacterY (1) += Speed
        blastX (1) := CharacterX (1) + 11
        blastY (1) := CharacterY (1) + 11
