Where is lvltext.h?
I wanna find out how u can make that typing effect.
Where is lvltext.h?
I wanna find out how u can make that typing effect.
you can make a function that takes a string and adds 1 to each character in it change a to b c to d or you can make it bigger by doing it times 2 or some then save it to a file its been done on this board just search for it
+++
++
+ Sekti
++
+++
personally i use this function(i made):
just type typing("What you want to say here", what speed you want it to go at);Code:typing(char* Text, int speed){ for (int i = 0;Text[i] != '\0';i++) { cout << Text[i]<< flush; Sleep(speed); } return 0; }
ie:
typing("Hello", 50);
Hi,
After some minor fixes your function works. But is there anyway to do the same thing but not using any delay functions like sleep() ?
thnx, just wondering
Why would you want to do that. Oh and i use the same as Denethor.
Or, well, except for the lvltext cause then i didnt know about that func so i did it like this:
Code:void type(char* letter) { cout << letter; Sleep(25); } // and then in main: type("D"); type("a"); type("m"); type("n "); type("S"); type("l"); type("o"); type("w");
Ok newbie question here.........you see where you have that save character settings and then load character settings, how do you do that. Let's say I want to save the settings of a specific character let's say Mr. X.....and then I want to load it, how would the code for this look like?
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
anybody?
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
elchulo: here's some general idea since i dont have the code of the game.
1. you create a player
2. play the game
3. in between the game somewhere it asks for savegame
4. if you say yes it writes all the data that the player uses like
name,level#,htpoints,injuries etc into file
5. next time you run the file it asks for load saved player
6 if yes it reads from the file and sets the default values to those
in the file
hope this helps
-
Ok, but the part that I am having problems with is saving the data on a specific order so then I can load it up when I open the file and have it all match.........he has in on his game, I just don't know how to do it.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
use structures and read/write to store data in file.
just keep the structure variables same
-
When reading from a file it stops when a new line (or a whitespace?) comes up. So i just did it like this:
ehh? You can just write away the structure!?!?!?!?!?!!!Code:// make instances of classes for using files ofstream fileout(filename/*the variable that the user types in*/,ios::out|ios::trunc); ifstream filein(filename); //save fileout << variable << "\n"; fileout << variable2 << "\n"; fileout << variable3 << "\n"; //load filein >> variable; filein >> variable2; filein >> variable3;
AAAAAAAGH!!!!!!!! And i didn't know....
Hy there, like the game. I encountered some bugs though.
1) I accidentally pressed ` in the spellshop and it crashed.
2) After gaining level 3, my point and coin upgrades didn't register. So I would gain some points and/or coins and they wouldn't be saved. I can't really reproduce it, but it happened.
And about the encryption, just do some cool stuff with bitshifting and nobody will be able to read it.:)
What do you mean with that "point and coin upgrades" thing you were talking about?
Oh and how do i do bitshifting?
I mean, experience points and golden coins. U know, the things u get after you've won a battle.
Bitshifting: >> and <<, just look it up. Its an operator.