
-----------------------------------
Legion
Thu May 01, 2014 7:40 pm

My menu fails to exit
-----------------------------------
What is it you are trying to achieve?
I want my menu to remain at the top of the screen and the game to exit the menu when the enemy is out of hp.


What is the problem you are having?
No matter what I do, it seems to be impossible to have the enemy die when he should and have the menu close as a result.

Describe what you have tried to solve this problem
I have tried rearranging the exit when.

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)




proc attack
    if spd >= eSpd then                                      %If your speed is greater than you will be prompted to attack first
        if Rand.Int (1, 100)  style then
            %If a random number generated is less than the enemy's evasivness and their evasivness is greater than your style, the enemy dodges your attack
            put "The enemy avoided your attack!"
        else
            eHealthPhy                                              %Enemy health calculations are made
            put "You heroically attack the enemy!"
            put "Enemy Health: ", eHp
            Input.Pause
            Draw.Cls
            bars
        end if
        put "Trooper is charging towards you!"
        if Rand.Int (1, 100)  eStyle then
            %If a random number less than your evasivness is generated and your evasivness is greater than the enemy's style you dodge the attack
            put "You expertly evaded the enemy attack!"
        else
            healthPhy
            put "Trooper bit you!"
            put "Health: ", hp
            Input.Pause
            Draw.Cls
            bars
            if hp 