You see, I want to do this because I:
First:I make 5 differents dats that have five different adverts.
Second: The loader will randomly load a different dat, making it look like it downloads different adverts.
Thanks
![Smile :)](http://game-editor.com/forum/images/smilies/icon_smile.gif)
int adno = rand(4) + 1;
char[256] adname;
sprintf(adname, "ad%i.dat", adno);
LoadGame(adname);
CrackedP0t wrote:Let's call the ads ad1.dat, ad2.dat, ad3.dat, ad4.dat, and ad5.dat.
When you want to load a new ad, use this code:
- Code: Select all
int adno = rand(4) + 1;
char[256] adname;
sprintf(adname, "ad%i.dat", adno);
LoadGame(adname);
That should work. If you get the ads working, you should tell us how; I, for one, would be very interested to find out!
openUrl("youradflylink");
lcl wrote:Why exactly do you ned to use multiple dat files for that kcg?
You could just have one actor with a random picture and open link depending on which animation was used. Overall, it's recommended to keep the count of separate dat files to minimum because every dat file makes your game bigger in size.
Users browsing this forum: No registered users and 1 guest