Okay, I read the guide and used the examples to build 2 Missions and a campaigne xml. Both are working. Then I started to build the briefing.xml ... I think its fine so far. Thats what its look like:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
- <briefing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="briefing.xsd">
- <navpoints>
- <navpoint radius="200.0" scriptid="$nav1" name="Start">
- <ships>
- <ship name="piranha.mesh.bin" autopilot="true" aligment="friendly" capship="false" scriptid="$player">
- <location>
<point x="20.00" y="0.00" z="0.00" />
</location>
</ship>
- <ship name="piranha.mesh.bin" autopilot="true" aligment="friendly" capship="false" scriptid="$wingman">
- <location>
<point x="20.00" y="0.00" z="0.00" />
</location>
</ship>
- <ship name="midway.mesh.bin" autopilot="false" aligment="friendly" capship="true" scale="0.5">
- <location>
<point x="60.00" y="0.00" z="0.00" />
</location>
</ship>
</ships>
- <location>
<point x="10.5" y="-50.66" z="0.6" />
</location>
</navpoint>
- <navpoint radius="200.0" scriptid="$nav2" name="Nav 2">
- <ships>
- <ship name="squid.mesh.bin" autopilot="false" alignment="enemy" capship="false" scriptid="$squid">
- <location>
<point x="20.0" y="5.0" z="10.0" />
</location>
</ship>
</ships>
- <ships>
- <ship name="squid.mesh.bin" autopilot="false" alignment="enemy" capship="false" scriptid="$squid">
- <location>
<point x="20.0" y="5.0" z="10.0" />
</location>
</ship>
</ships>
</navpoint>
</navpoints>
</briefing>
Sooooo now let us come tom my problems ^^
I dont get the lua code, with or without the guide ...
The guide doesnt name these parts of your exampel "mission_a1.briefing.lua"
Code:
dofile "flightcommander_briefing.lua"
STATE_NAV1 = 0;
STATE_NAV1_TO_2 = 1;
STATE_NAV2 = 2;
STATE_NAV2_DESTROYED = 2.5;
STATE_NAV2_TO_3 = 3;
STATE_NAV3 = 4;
STATE_DONE = 5;
nav1interptime = 10000;
nav2time = 20000;
nav2destroytime= 25000;
nav2interptime = 30000;
nav3time = 40000;
nav3interptime = 50000;
What does these things do?
then next
Code:
BriefingShip_setHeadingInterpNavs("$player", "$nav3", "$nav1", "$nav2", 10000);
Ok this code says, so far as I know:"Let the "Player" Icon move from nav 3 to nav 1 to nav 2, with a time of 10 seconds" .... but why dont you to programmed "Nav 1 to Nav 2 to Nav 3" ?
What does this mean?
WHEN I understand this right you need the "State" Command to set your perimeters for the "When if else" Script, didnt you?
Code:
function advance()
local now = Mission_getElapsedTime();
What does this do?
Code:
if(now > nav1interptime and state == STATE_NAV1) then
state = STATE_NAV1_TO_2;
BriefingShip_setLocationInterpNavs("$player", "$nav1", "$nav2", 10000);
Overlay_setText("Leave the Midway, and proceed to Nav 2.");
Briefing_playSound("mission_a1_briefing_2.mp3");
elseif(now > nav2time and state == STATE_NAV1_TO_2) then
state = STATE_NAV2;
BriefingShip_setHeadingInterpNavs("$player", "$nav1", "$nav2", "$nav3", 10000);
Overlay_setText("Once at Nav 2, eliminate all enemy forces.\nYou may encounter a Moray wing.");
Briefing_playSound("mission_a1_briefing_3.mp3");
Okay this is a little bit too complicate 4 me .... the 1st String says "When counted time (10 Seconds) and status 1 = State 1 are the same then change to Status "State_Nav1_to_2" and move PlayerShip Icon from Nav 1 to Nav 2, play the mp3 and ... well the rest of the code I dont get ...
I would be glad if someone can help me out! thx