-
I also think Macintosh 84 is Windows 95, which is just a GUI for DOS (Isn't it?)
But I thank everyone for their help, although I just thought I would ask, is your REDRAW_ENGING capable fo doing 3d?
Any way, does anyone know if its possible to print all instances of a class, as I need to be able to list all planets, as well as showing the coordinates of each planet.
Also, how I could detect if the player has arrived at a planet, I was thinking of something like:
Code:
int main(){
pName.checkl();
}
class planet
{
int sLy;
int sLx;
int sLz;
string sName
public:
void checkl(){
if (sLx==pLx){cout<<"You have arrived at the
planet "<<sName<<"!\n";}
}class pName
Thank you in advance, and for all of your other help.
-
Look into linked lists. At least, that's how I would do it in C.
-
Well I've gone with your suggestion, and will be creating a linked list for my planet class.
I've got 1 question though, how could I detect if the player has arrived at a certain planet? I was thinking of using an array, however wouldnt this mean that the program would have to create a new variable every time a new planet was created?
Thank you for your help, and any more you offer me.
-
Again, use a linked list. Dynamically create and destroy your planets as you need them as well as being able to find out how many planets exist and whatever else you can think of.
-
Check if the player XP==Planet XP and Player YP==Planet YP
XP=X Position
YP=Y position
And the redraw_engine is not capable of doing 3D. How long have you been programming?