In part 6 the main thing worked on was the Case Statement that will provide the checks on what sPlayerAction has been received from the player. These mostly match our Mind Map that we created in Part 1, with a few additions thought up on the way.
The next item is to think about how to Loop and get the player to drop out of the game if a) they die or b) they Quit the game. In the previous post it seemed it was an If statement that would be simplest. Instead of that however, VBScript provides an even simpler way, using the Do Until... Loop construct.
Given we want to cover both the events of the player getting 0 Hit Points (aka becoming dead) and Quitting - we also need to use Or in the statement.
Using SciTe colouring it looks like this:
Do Until iPlayerHp <= 0 OR sPlayerAction = "Quit"
... case statements