Where is lvltext.h?
I wanna find out how u can make that typing effect.
Printable View
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
I don't really understand what you mean sorry.
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?
anybody?
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.
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.