Random picture in menu

Ask questions, discuss ideas, get answers
Post Reply
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

Random picture in menu

Post 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?
dzn.battlefield.pl - my Bf1942 modding website
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Random picture in menu

Post 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
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

Re: Random picture in menu

Post 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!
dzn.battlefield.pl - my Bf1942 modding website
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Random picture in menu

Post 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.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Random picture in menu

Post 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" ... ?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Random picture in menu

Post 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.
Ruuga
Posts: 44
Joined: Wed Jul 14, 2010 12:25 pm

Re: Random picture in menu

Post by Ruuga »

Try to load "*.tga" but I think it chooses the first image in alphabetical list.
Post Reply