Ok, now every FL script (to my knowledge) begins with a duration declaration, and then a scene entity, and ya can just copy those if ya make a new script.
here's how things work in FL scripts:
Everything has to be declared. You can only use things from solararch.ini, shiparch.ini, effects.ini, and the starspheres and nebulaspheres.
so, here's how to declare a ship:
{
entity_name="Ships_li_dreadnought", <-- this is the name used to reference it in this script
type=COMPOUND, <-- must be this for ships
template_name="li_dreadnought", <-- what to use from shiparch.ini
lt_grp=4,
srt_grp=0,
usr_flg=0,
flags=LIT_DYNAMIC,
spatialprops={
pos={ <-- position to start at... only used is stationary
7760.895996,
612.4628300000001,
-4181.624023
},
orient={ <-- rotational vectors
{
-0.955097,
0,
-0.296293
},
{
0,
1,
0
},
{
0.296293,
0,
-0.955097
}
}
},
userprops={ <-- I assume this tells it where to get the template from...
category="Spaceship"
}
},
now, you can mae the template anything from shiparch.ini
we have a ship, now let's make it follow a path:
This is a path from gasminer3.thn:
{
entity_name="Path_1_copy_1",
type=MOTION_PATH,
template_name="",
lt_grp=0,
srt_grp=0,
usr_flg=0,
spatialprops={
pos={
5,
6.576355,
55
},
orient={
{
1,
0,
0
},
{
0,
1,
0
},
{
0,
0,
1
}
}
},
pathprops={
path_type="CV_CROrientationSplinePath",
path_data="OPEN, {7760.895996,612.463013,-4181.623535}, {1.000000,0.000000,0.000000,0.000000}, {7465.413574,612.463013,-3846.421143}, {1.000000,0.000000,0.000000,0.000000}, {7569.932129,612.463013,-3511.218262}, {1.000000,0.000000,0.000000,0.000000}, {7474.450684,612.463013,-3176.015137}, {1.000000,0.000000,0.000000,0.000000}, {7358.968750,612.463013,-2840.812256}, {1.000000,0.000000,0.000000,0.000000}, {7283.486816,612.463013,-2505.608887}, {1.000000,0.000000,0.000000,0.000000}, {7188.005371,612.463013,-2170.406006}, {1.000000,0.000000,0.000000,0.000000}, {7092.523438,612.463013,-1835.202759}, {1.000000,0.000000,0.000000,0.000000}, {6997.041504,612.463013,-1500.000000}, {1.000000,0.000000,0.000000,0.000000}, "
}
},
all the numbers at the bottom are points for the path to follow, i'm not sure how to calculate them, tho. What you CAN do is edi the pos={ section:
pos={
5, <-- positive is right, negative is left
6.576355, <-- positive is up, negative is down
55 <-- positive is forward, negative is back
},
I'm assuming that these paths are calculated from the center of the scene.
now, you need to have the ship go down the path... under the events={ section, at the end of the declarations, you would put:
{
0, <--this tells it how many time units to delay the action (I think)
START_PATH_ANIMATION,
{
"Ships_li_dreadnought", <-- which entity to put on the path
"Path_1" <-- which path to use
},
{
duration=60, <-- I'm not sure what the next three do...
start_percent=0,
stop_percent=1,
offset={
90,
45,
45
},
up=Y_AXIS,
front=NEG_Z_AXIS,
flags=POSITION + ORIENTATION + LOOK_AT <--this seems to tell the ship to face in the direction of the waypoint
}
},
As you can see, there is a field called offset={
this is exactly like the pos={ field discussed earlier. This time, it tells the offset by which the ship is placed on the path.
ok, now you have a ship, on a path. assuming you simply edited the gasminer3.thn, you are almos good to go.
to get it to allways show up when you start freelancer (there are three possible menu backgrounds, randomly chose when you start FL) you need to edit two files:
intro2_vlocanoplanet.ini
intro3_planetchunks.ini
both in DATA\UNIVERS\SYSTEMS\INTRO\BASES\ROOMS
you'll need to decompile them with bini and change this line in both:
[Room_Info
scene = ambient, Scripts\Intro\xxxxxx.thn
to:
[Room_Info
scene = ambient, Scripts\Intro\gasminer3.thn
save both files, and make sure you put the decompiled ini's back into the right folders, and made sure they still had the .ini extension, not .ini.txt as bini makes them. now, load freelancer, and you should see the intro with the ship going by eventually.
P/-/3@R D@ D@\/\/G F00lZ
Check out what I'm doing for Reynen's Mod @ my website!
Edited by - BobTheDog on 07-06-2003 07:02:30