Multi custom load screens?

Timmy_kirton

Well-Known Member
Hi guys i was just thinking is it possible to have a few pics that get selected at random each time someone loads the game any help would be great
 

Andrew_S90

Valued Member!
Staff member
might be something like this (NOT TESTED)

loadScreen = ["test1.jpg","test2.jpg","test3.jpg"] call BIS_fnc_selectRandom;

That might be it, not sure.. feel free to test it though :p
 

CommanderRetra

Moderator
Staff member
This is all theory and will probably not work but it's worth a try seeing as you've got nothing to lose. Every failure is one step closer to success.

In the descriptions.ext
Code:
loadScreen = "random.sqf";
Create a random.sqf
Code:
["loadScreen = "test1.jpg"","loadScreen = "test2.jpg"","loadScreen = "test3.jpg""] call BIS_fnc_selectRandom;

May work for you but no guarantee. This is all theory and untested.
 

CommanderRetra

Moderator
Staff member
I have no idea I haven't had time to test it as it isn't one of my prioritys atm nor do I care about multi-custom loads careens and with exams and shit coming up soon I have no time ;( . But I have been really eager to know if it works or not definitely reply on this thread if it works.
 
I have no idea I haven't had time to test it as it isn't one of my prioritys atm nor do I care about multi-custom loads careens and with exams and shit coming up soon I have no time ;( . But I have been really eager to know if it works or not definitely reply on this thread if it works.
I will get on it ASAP once im back from school. I'm aswell very excited if this works. :D
 
Guess it will not work due to the fact that the descriptions.ext is a "passive" file. You need an active file (like init.sqf) where some code is executed and/or from where you can refer to the description.ext.
 

MikeTheMike

Well-Known Member
Hey :)

I 'kind of' solved it...

Made 2 folders - 1 with a mission pbo with each of my two images.

Made a batch file that generates a random number, then based on that random number, select the pbo from either folder 1 or folder 2 and copy it over the mpmissions pbo :D

It means the image only rotates on reboots (I call this batch file from my reboot batch file) and also sometimes the same one may appear twice etc (nature of random numbers I guess!), but it's 'okay'.
 
In init.sqf
Code:
startLoadingScreen ["","RscDisplayLoadCustom"];
I'd assume recreating the startLoadingScreen script would achieve what you are looking for, as you could define statically the different loading screens and then have the script select which RSCDisplay to execute.

Again, haven't tested this, but it seems logical enough to work. I'll give it a crack.
 
make new file called load.sqf paste this code in the and save it put the file in the main mission folder with init.sqf
Code:
_var = random 1;
if (_var < 0.20) then {
loadScreen = "loadsc\1.jpg";
} else {
if (_var < 0.40 and _var > 0.20) then {
loadScreen = "loadsc\2.jpg";
} else {
if (_var > 0.40 and _var < 0.60) then {
loadScreen = "loadsc\3.jpg";
} else {
if (_var > 0.60 and _var < .80) then {
loadScreen = "loadsc\4.jpg";
} else {
if (_var > 0.80 and _var < 1) then {
loadScreen = "loadsc\5.jpg";
};
};
};
};
};
};
};
};
};
};
then go to description fined loadScreen = "your_name.jpg";
change to #include "random.sqf"

make new folder called loadsc
put jpg files in there 5 jpg's maxs
 
Top