Multi custom load screens?

Discussion in 'Mission Editing' started by Timmy_kirton, Apr 17, 2013.

  1. Timmy_kirton

    Timmy_kirton Well-Known Member

    Joined:
    Apr 3, 2013
    Messages:
    151
    Likes Received:
    8
    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
     
  2. Andrew_S90

    Andrew_S90 Valued Member! Staff Member

    Joined:
    Jan 18, 2013
    Messages:
    292
    Likes Received:
    41
    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
     
  3. Timmy_kirton

    Timmy_kirton Well-Known Member

    Joined:
    Apr 3, 2013
    Messages:
    151
    Likes Received:
    8
    yea I tested this way as was thinking it would make seance but just says the line as 1 pic
     
  4. Andrew_S90

    Andrew_S90 Valued Member! Staff Member

    Joined:
    Jan 18, 2013
    Messages:
    292
    Likes Received:
    41
    hmm, not sure there :\ sorry
     
  5. Timmy_kirton

    Timmy_kirton Well-Known Member

    Joined:
    Apr 3, 2013
    Messages:
    151
    Likes Received:
    8
    anyone have any ideas
     
  6. CommanderRetra

    CommanderRetra Yogi Bear|Moderator Staff Member

    Joined:
    Apr 3, 2013
    Messages:
    553
    Likes Received:
    157
    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.
     
  7. tom yoyo

    tom yoyo Member

    Joined:
    Apr 25, 2013
    Messages:
    35
    Likes Received:
    1
    Has CommanderRetra's theory work? I'll try it once I get back from school.
     
  8. CommanderRetra

    CommanderRetra Yogi Bear|Moderator Staff Member

    Joined:
    Apr 3, 2013
    Messages:
    553
    Likes Received:
    157
    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.
     
  9. tom yoyo

    tom yoyo Member

    Joined:
    Apr 25, 2013
    Messages:
    35
    Likes Received:
    1
    I will get on it ASAP once im back from school. I'm aswell very excited if this works. :D
     
  10. CommanderRetra

    CommanderRetra Yogi Bear|Moderator Staff Member

    Joined:
    Apr 3, 2013
    Messages:
    553
    Likes Received:
    157
  11. Ricki

    Ricki Member

    Joined:
    Apr 29, 2013
    Messages:
    42
    Likes Received:
    0
    did this work?
     
  12. CommanderRetra

    CommanderRetra Yogi Bear|Moderator Staff Member

    Joined:
    Apr 3, 2013
    Messages:
    553
    Likes Received:
    157
  13. P1-Kashwak

    P1-Kashwak Member

    Joined:
    Dec 21, 2012
    Messages:
    96
    Likes Received:
    17
    try this

    loadScreen = __EVAL(["test2.jpg", "test1.jpg", "test.jpg"] select floor random 3);
     
  14. MikeTheMike

    MikeTheMike Well-Known Member

    Joined:
    Jan 29, 2013
    Messages:
    112
    Likes Received:
    4
    Did the solution below work for anyone?

     
  15. Mamu1234

    Mamu1234 Member

    Joined:
    Jan 2, 2013
    Messages:
    84
    Likes Received:
    24
    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.
     
  16. MikeTheMike

    MikeTheMike Well-Known Member

    Joined:
    Jan 29, 2013
    Messages:
    112
    Likes Received:
    4
    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'.
     
  17. [GSG] Az

    [GSG] Az Member

    Joined:
    Mar 27, 2013
    Messages:
    49
    Likes Received:
    17
    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.
     
  18. killerkiwi96

    killerkiwi96 New Member

    Joined:
    Jun 7, 2017
    Messages:
    2
    Likes Received:
    0
    ok long response im working on this now
     
  19. killerkiwi96

    killerkiwi96 New Member

    Joined:
    Jun 7, 2017
    Messages:
    2
    Likes Received:
    0
    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
     

Share This Page