Ok so I have design and written up my inventory for my game using vectors, I have created various other bits n bobs, the part that has hindered me the most is how to go about structuring the moving between my areas.
I had a thread on this, and now I know how the moving works, I just need a bit of correction on the way I should integrate this into my game structure.
I know the way I have done it is not desireable but Im no pro at the moment.
My basic plan is to split my 3 stories into 3 functions, which are split into 3 files.
Now this compiles and runs the way it is except it does not execute the void storyone() function. It just skips it and ends the program.
Maybe something to do with putting it in a header file, but I was told it is bad to include .cpp files are they are compiled separately.
Note: this is mostly group of examples I have put together to help with my understanding so its very rough.
main.cpp
Code:
cout << "Easy,Normal or Hard. \n1\t2\t3\n\n";
int iTempDifficulty;
cin >> iTempDifficulty;
do { // Do While -
if (iTempDifficulty == 1) { // Set Case If
iGlobalLevelChoice = 1;
}
else if (iTempDifficulty == 2) { // Set Case If
iGlobalLevelChoice = 2;
}
else if (iTempDifficulty == 3) { // Set Case If
iGlobalLevelChoice = 3;
}
else { // If none above then do
cout << "Invalid selection! \nPlease choose a level,\n\n EASY \t Normal \n HARD \n\n";
}
} while (iGlobalLevelChoice == 0);
cout << "\nNow that we are all set up; let the game begin.................................. \n\n";
cout << "\n\n";
void storyone();
story1.h
Code:
void storyone()
{ bla bla bla ......
}