1.4 patch 1 up

Hmm, still haven't been able to reproduce this. With these files

Code:
dofile "flightcommander.lua"

function init()
--  Mission_setAutopilotEnabled(false);
--  Camera_setCameraType(CAMERA_COCKPIT)
  alliancedead = 0;
  networkdead = 0;
end

function onalliancedead(shipid)
  alliancedead = alliancedead + 1;
  if (alliancedead == 4) then
    Objective_setState(0, OBJECTIVE_COMPLETE)
    if (networkdead == 5) then
      Comm_playVideo("sonicunderground_oneleft.wav", "midway_statusbad.avi", "Sonic Underground", IFF_FRIEND);
    end
    if (networkdead == 4) then
      Comm_playVideo("sonicunderground_twoleft.wav", "midway_statusbad.avi", "Sonic Underground", IFF_FRIEND);
    end
  end
end


function onnetworkdead(shipid)
  networkdead = networkdead + 1;
end

function ontransportdead(shipid)
--  Objective_setState(1, OBJECTIVE_COMPLETE) -- Gotta Fix
end




function Nav1Enter()
  Comm_playVideo("sonicunderground_return.wav", "midway_landing_bad.avi", "Sonic Underground", IFF_FRIEND);
-- Objective_setName(0, "Destroy all Alliance fighters.");
--  Objective_setState(0, OBJECTIVE_INCOMPLETE)
--  Objective_setName(1, "Protect the Sonic Underground.");
--  Objective_setState(1, OBJECTIVE_INCOMPLETE)
--  Mission_setAutopilotEnabled(true);
end

function Nav2Enter()
  Comm_playVideo("spite_wingattack.wav", "helmet.avi", "Spite", IFF_ENEMY);
  Ship_setForceEject("$all1", true);
end

-- Friendly

-- Pale Moon Rise
-- Kirvee
-- Jarrah
-- Kool Kat
-- Rocky

-- Baddie

-- Lilix
-- Alliance Marine Transport
-- Mista
-- Soopaha
-- Spite
init();

And this xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mission name = "" sector="blue" can_eject="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mission.xsd">
  <navpoints number="2">
    <navpoint numships="5" numwaves="1">
      <ship name="network" pilot="player" comm="casey" video="helmet" autopilot="true" must_survive="true" alignment="friend"  wave="0">
        <location>
          <point  x="-0.1669449" y ="0.0" z ="-7.345576" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
      </ship>
      <ship name="networkwing" pilot="Pale Moon Rise" comm="maestro" video="helmet" autopilot="true" alignment="friend"  wave="0" scriptid="$net2">
        <location>
          <point  x="-2.3372288" y ="0.0" z ="-8.514191" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onnetworkdead"  />
      </ship>
      <ship name="networkwing" pilot="Kirvee" comm="maestro" video="helmet" autopilot="true" alignment="friend"  wave="0" scriptid="$net3">
        <location>
          <point  x="2.1702838" y ="0.0" z ="-8.84808" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onnetworkdead"  />
      </ship>
      <ship name="networkwing" pilot="Kool Kat" comm="spite" video="helmet" autopilot="true" alignment="friend"  wave="0" scriptid="$net1">
        <location>
          <point  x="-4.5075126" y ="0.0" z ="-10.016694" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onnetworkdead"  />
      </ship>
      <ship name="networkwing" pilot="Jarrah" comm="jarrah" video="helmet" autopilot="true" alignment="friend"  wave="0" scriptid="$net4">
        <location>
          <point  x="4.0066776" y ="0.0" z ="-10.350584" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onnetworkdead"  />
      </ship>
      <script oncreate="Nav1Enter"  />
    </navpoint>
    <navpoint numships="7" numwaves="1">
      <ship name="midway" pilot="midway" comm="midway" video="midway" autopilot="false" land="true" alignment="friend"  wave="0">
        <location>
          <point  x="-363.27213" y ="0.0" z ="4658.4307" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
      </ship>
      <ship name="alliance" pilot="Lilix" comm="maestro" video="helmet" autopilot="false" alignment="enemy"  wave="0" scriptid="$all3">
        <location>
          <point  x="4594.3237" y ="0.0" z ="-4402.0034" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onalliancedead"  />
      </ship>
      <ship name="alliance" pilot="Mista" comm="stiletto" video="helmet" autopilot="false" alignment="enemy"  wave="0" scriptid="$all2">
        <location>
          <point  x="4337.8965" y ="0.0" z ="-4679.8" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onalliancedead"  />
      </ship>
      <ship name="alliance" pilot="Soopaha" comm="maestro" video="helmet" autopilot="false" alignment="enemy"  wave="0" scriptid="$all1">
        <location>
          <point  x="4038.7312" y ="0.0" z ="-5021.7026" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onalliancedead"  />
      </ship>
      <ship name="alliance" pilot="Spite" comm="spite" video="helmet" autopilot="false" alignment="enemy"  wave="0" scriptid="$all4">
        <location>
          <point  x="4102.838" y ="0.0" z ="-4380.6343" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onalliancedead"  />
      </ship>
      <ship name="marinelc" pilot="Alliance Marine Transport" comm="maestro" video="helmet" autopilot="false" alignment="enemy"  wave="0" scriptid="$trans">
        <location>
          <point  x="4701.1685" y ="0.0" z ="-4872.12" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="ontransportdead"  />
      </ship>
      <ship name="panther" pilot="Rocky" comm="maestro" video="helmet" autopilot="false" alignment="friend"  wave="0" scriptid="$net5">
        <location>
          <point  x="-534.2237" y ="0.0" z ="4594.3237" />
        </location>
        <rotation>
          <point  x="0.0" y ="0.0" z ="0.0" />
        </rotation>
        <script ondestroy="onnetworkdead"  />
      </ship>
      <script oncreate="Nav2Enter"  />
    </navpoint>
  </navpoints>
  <objectives>
    <objective name="Destroy all fighters" category="primary" default="complete" />
  </objectives>
</mission>

By the way, you probably want to edit objective names and initial values in the mission editor. You typically only change the objective state in a script. You typically only need Objective_setState(int objectivenumber, int state).
 
I've found the problem. It seems that when the joystick is initialized it thinks that some buttons or something related, have been pressed. Before, the take off would have stopped any input.

I was able to fix the wingmen thinking I attacked them by changing their ship position.
 
Back
Top