Page 1 of 1
Random picture in menu
Posted: Sun Apr 03, 2011 6:01 pm
by archer
Hi, I'd like to modify LoadMenu in menu.rfa, so that it would display a randomly chosen picture from a given path within the same archive. The pictures reside in /menu/loadpics/ and are named 01.tga through 10.tga. I want the game to take one picture at random and display it each time a map is loaded. Is it at all possible?
Re: Random picture in menu
Posted: Sun Apr 03, 2011 8:07 pm
by fo0k
When you say load menu I guess you mean load screen?
You can certainly use a bik for a video with a few frames but no idea if a random static pic is possible
Re: Random picture in menu
Posted: Mon Apr 04, 2011 2:43 pm
by archer
I'm quite sure it is possible by using a VariablePictureNode or something similar, but since I have neither time nor will to experiment with all that undocumented menu mess, I'll just resort to using the bink option. Thanks!
Re: Random picture in menu
Posted: Wed Apr 13, 2011 4:02 pm
by fo0k
If you do figure out a way to use variables for this purpose then shout
Little seems to be understood about how variables can be used in modding.
Re: Random picture in menu
Posted: Thu Apr 14, 2011 11:14 pm
by Swaffy
Hmm ... say you want to have two pictures for picture 7.
Will naming them like this work?
7_1.tga
7_2.tga
Then just tell the map to load the image named "7.tga" ... ?
Re: Random picture in menu
Posted: Tue Apr 26, 2011 9:46 pm
by Senshi
I'm 110% sure this doesn't work. Randomizing only works via the RandomGeometries-workaround - but that is for ingame stuff only. I'm not certain how variables are supposed to help you here, either. BF42 does support variables in code for pretty much everything (though it's rarely ever used), but it won't help you in defining how the variable should be randomized.
EDIT: For some nice introduction to variables in BF42 and things you
can use them for, check this site:
http://www.velotech.net/battlefield/tutorials.php
Pick the "Using conditional statements" tutorial from the dropdown box. It's pretty straightforward and very enlightening. It does help to have some very basic understanding of compiler languages, though.
Re: Random picture in menu
Posted: Sun May 01, 2011 5:28 pm
by Ruuga
Try to load "*.tga" but I think it chooses the first image in alphabetical list.