I need help making a batch game

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
DethKlok
Posts: 3
Joined: 04 May 2013 15:02

I need help making a batch game

#1 Post by DethKlok » 04 May 2013 15:07

My problem is that whenever i open my game batch file, i press 1 and it goes to the last echo line i made and then closes when i press a key. Can someone check my coding?


@echo off
color 05
:looop
:Menu
cls
echo Welcome to the Ransack of the Roman empire!
echo here's your choices:
echo 1)start game
echo 2) leave game
set /p car=
if %car% == 1 goto game
if %car% == 2 goto exitmenu
pause
:game

cls
echo YOU: where am I? I'm gonna go ho-huh?
cls
echo Bob: Ahh! Hello and welcome to your training session!
cls
echo YOU: Who are you?
cls
echo Bob: I am your trainer
cls
echo YOU: What's your name?
cls
echo Bob: My name is Bob...
cls
echo YOU: Well hello bob but I gotta head home.
cls
echo Bob: Not so fast!
cls
echo YOU: What do you mean 'not so fast'?
cls
echo Bob: I mean uhh...
cls
echo YOU: What are you gonna say?
cls
echo Bob: Look kid, it's hard to explain but...
cls
echo YOU: BUT WHAT???
cls
echo Bob: Your parents were murdered by the Roman Government.
cls
echo YOU: Wait...
cls
echo YOU: No...
cls
echo YOU: This can't be happening...
cls
echo YOU: I'll kill them if it's the last thing I do or not.
cls
echo Bob: That's why my leader sent me to train you for battle.
cls
echo YOU: I'll do everything I can to bring down the government...

pause

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: I need help making a batch game

#2 Post by Squashman » 04 May 2013 16:34

It is doing all your ECHO and CLS commands so quickly that you are not seeing them execute. Put a pause before each of your CLS commands.

DethKlok
Posts: 3
Joined: 04 May 2013 15:02

Re: I need help making a batch game

#3 Post by DethKlok » 04 May 2013 17:42

THANK YOU it now works!!!

Post Reply