Quote: "I was hopeing that maybe someone would be kind enough to share with me how I could make these 3 textures show up at random as a segment; there are some stock FPSC content that when you place a segment on your map some random varations show up depending upon how big the room is ect. Maybe one of you know of a tutorial or have a code example to share with me, or even a link to an exsisting topic covered on these forums."
This is one of those things that's a lot easier to do than it is to explain, so my apologies if you have to read this twice to make sense of it
Check out this extract from the WW2 'Bunker Fighting Area' segment, which uses multiple textures.
partmode0 = 0
meshname0 = meshbank\ww2\france\rooms\bunker_fighting_area\floor_a.x
offx0 = 0
offy0 = -51
offz0 = 0
rotx0 = 0
roty0 = 0
rotz0 = 0
texture0 = texturebank\ww2\floors\concrete\f_e_01_d2.tga
transparency0 = 0
effect0 =
colmode0 = 1
csgmesh0 =
csgmode0 = 0
csgimmune0 = 1
lightmode0 = 0
multimeshmode0 = 1
materialindex0 = 2
The .fps file tells FPSC to use 'floor_a.x' for the mesh and 'f_e_01_d2.tga' for the texture, but the line 'multimeshmode0=1' further tells the engine that if it can find 'floor_b.x' and 'floor_c.x' in the same meshbank folder, and 'f_e_02_d2.tga' and 'f_e_03_d2.tga' in the same texturebank folder, it should use a random selection of these to build the room.
Assume a user-created room segment called 'Cell', that uses a single texture on walls,floor and ceiling. The folder path and content could appear as follows...
meshbank\user\rooms\cell
ceiling.x
floor.x
wall.x
texturebank\user\rooms\cell
ceiling_D2.tga
floor_D2.tga
wall_D2.tga
However, if the 'Cell' segment was designed to use three variations of wall texture, the folder contents would look like this;
meshbank\user\rooms\cell
ceiling.x
floor.x
wall_a.x
wall_b.x
wall_c.x
texturebank\user\rooms\cell
ceiling_d2.tga
floor_d2.tga
wall_1_d2.tga
wall_2_d2.tga
wall_3_d2.tga
One last thing to note, if a segment is identified as 'multimeshmode=1' in its .fpi file, then FPSC will expect to find a,b and c versions of the mesh, and 1,2 and 3 versions of the texture, and will cough up a fatal error if it doesn't.
Hope this helps
- Graham