Winnyfred
Rear Admiral
Hey can anyone tell me how to fix this problem I'm having? It's a script that is supposed to kill a pilot 10 sec into the nav, but in the mission it failed to initialize. When I took out the enemy ships at the nav, after I take off, the game crashes to desktop. Anyone tell me what is wrong?
Here is the script:
dofile "flightcommander.lua"
function nav1()
Ship_setHitPoints("dallas", .1)
end
function nav2()
Ship_setHitPoints("dallas", .0)
Ship_destroy("dallas")
end
function nav1create()
start_time = Mission_getElapsedTime()
Dallastime = start_time + 10000
end
function nav2create()
Ship_destroy("dallas")
end
function dallas()
Ship_destroy("dallas")
end
function nav1during()
current_time = Mission_getElapsedTime();
if current_time > Dallastime then
dallas();
end
end
_________________________
Here is the mission:
<?xml version="1.0" encoding="UTF-8"?>
<mission name = "" sector="blue" can_eject="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mission.xsd">
<navpoints number="4">
<navpoint numships="7" numwaves="1" name="nav0" >
<ship name="outpost" pilot="" comm="midway" video="midway" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-173.6227" y ="0.0" z ="-154.92487" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="Dallas" comm="maestro" video="helmet" autopilot="true" must_survive="true" alignment="friend" wave="0" scriptid="dallas">
<location>
<point x="-168.28047" y ="0.0" z ="64.10684" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="player" comm="casey" video="" autopilot="true" alignment="friend" wave="0">
<location>
<point x="-170.95158" y ="0.0" z ="-21.368948" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-58.764606" y ="0.0" z ="-264.44073" />
</location>
<rotation>
<point x="0.0" y ="121.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-98.83138" y ="0.0" z ="-285.8097" />
</location>
<rotation>
<point x="0.0" y ="126.0" z ="0.0" />
</rotation>
</ship>
<ship name="panther" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-427.37897" y ="0.0" z ="-181.63606" />
</location>
<rotation>
<point x="0.0" y ="184.0" z ="0.0" />
</rotation>
</ship>
<ship name="panther" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-454.09015" y ="0.0" z ="-168.28047" />
</location>
<rotation>
<point x="0.0" y ="184.0" z ="0.0" />
</rotation>
</ship>
<script oncreate="nav0" />
</navpoint>
<navpoint numships="0" numwaves="1" name="nav1" >
<script oncreate="nav1create" ondestroy="nav1" during="nav1during" />
</navpoint>
<navpoint numships="2" numwaves="1" name="nav2" >
<ship name="devil" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
<location>
<point x="-162.93823" y ="0.0" z ="-432.7212" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="devil" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
<location>
<point x="-98.83138" y ="0.0" z ="-486.14355" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<asteroids radius="0.0" number="1000">
<point x="0.0" y="0.0" z="0.0"/>
</asteroids>
</navpoint>
<navpoint numships="6" numwaves="1">
<ship name="outpost" pilot="" comm="midway" video="midway" autopilot="false" land="true" alignment="friend" wave="0">
<location>
<point x="-435.3923" y ="0.0" z ="-582.30383" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="wasp" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-64.10684" y ="0.0" z ="-657.09515" />
</location>
<rotation>
<point x="0.0" y ="92.0" z ="0.0" />
</rotation>
</ship>
<ship name="wasp" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-93.48915" y ="0.0" z ="-681.1352" />
</location>
<rotation>
<point x="0.0" y ="92.0" z ="0.0" />
</rotation>
</ship>
<ship name="refueler" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-168.28047" y ="0.0" z ="-365.94324" />
</location>
<rotation>
<point x="0.0" y ="100.0" z ="0.0" />
</rotation>
</ship>
<ship name="vampire" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-550.2504" y ="0.0" z ="-208.34724" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="vampire" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-518.19696" y ="0.0" z ="-213.68948" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
</navpoint>
</navpoints>
</mission>
I didn't see any problems with the mission or script, and FC didn't tell me that there was an issue, I checked it to make sure it didn't say anything.
Here is the script:
dofile "flightcommander.lua"
function nav1()
Ship_setHitPoints("dallas", .1)
end
function nav2()
Ship_setHitPoints("dallas", .0)
Ship_destroy("dallas")
end
function nav1create()
start_time = Mission_getElapsedTime()
Dallastime = start_time + 10000
end
function nav2create()
Ship_destroy("dallas")
end
function dallas()
Ship_destroy("dallas")
end
function nav1during()
current_time = Mission_getElapsedTime();
if current_time > Dallastime then
dallas();
end
end
_________________________
Here is the mission:
<?xml version="1.0" encoding="UTF-8"?>
<mission name = "" sector="blue" can_eject="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mission.xsd">
<navpoints number="4">
<navpoint numships="7" numwaves="1" name="nav0" >
<ship name="outpost" pilot="" comm="midway" video="midway" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-173.6227" y ="0.0" z ="-154.92487" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="Dallas" comm="maestro" video="helmet" autopilot="true" must_survive="true" alignment="friend" wave="0" scriptid="dallas">
<location>
<point x="-168.28047" y ="0.0" z ="64.10684" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="player" comm="casey" video="" autopilot="true" alignment="friend" wave="0">
<location>
<point x="-170.95158" y ="0.0" z ="-21.368948" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-58.764606" y ="0.0" z ="-264.44073" />
</location>
<rotation>
<point x="0.0" y ="121.0" z ="0.0" />
</rotation>
</ship>
<ship name="tigershark" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-98.83138" y ="0.0" z ="-285.8097" />
</location>
<rotation>
<point x="0.0" y ="126.0" z ="0.0" />
</rotation>
</ship>
<ship name="panther" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-427.37897" y ="0.0" z ="-181.63606" />
</location>
<rotation>
<point x="0.0" y ="184.0" z ="0.0" />
</rotation>
</ship>
<ship name="panther" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-454.09015" y ="0.0" z ="-168.28047" />
</location>
<rotation>
<point x="0.0" y ="184.0" z ="0.0" />
</rotation>
</ship>
<script oncreate="nav0" />
</navpoint>
<navpoint numships="0" numwaves="1" name="nav1" >
<script oncreate="nav1create" ondestroy="nav1" during="nav1during" />
</navpoint>
<navpoint numships="2" numwaves="1" name="nav2" >
<ship name="devil" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
<location>
<point x="-162.93823" y ="0.0" z ="-432.7212" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="devil" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
<location>
<point x="-98.83138" y ="0.0" z ="-486.14355" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<asteroids radius="0.0" number="1000">
<point x="0.0" y="0.0" z="0.0"/>
</asteroids>
</navpoint>
<navpoint numships="6" numwaves="1">
<ship name="outpost" pilot="" comm="midway" video="midway" autopilot="false" land="true" alignment="friend" wave="0">
<location>
<point x="-435.3923" y ="0.0" z ="-582.30383" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="wasp" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-64.10684" y ="0.0" z ="-657.09515" />
</location>
<rotation>
<point x="0.0" y ="92.0" z ="0.0" />
</rotation>
</ship>
<ship name="wasp" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-93.48915" y ="0.0" z ="-681.1352" />
</location>
<rotation>
<point x="0.0" y ="92.0" z ="0.0" />
</rotation>
</ship>
<ship name="refueler" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-168.28047" y ="0.0" z ="-365.94324" />
</location>
<rotation>
<point x="0.0" y ="100.0" z ="0.0" />
</rotation>
</ship>
<ship name="vampire" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-550.2504" y ="0.0" z ="-208.34724" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
<ship name="vampire" pilot="" comm="" video="" autopilot="false" alignment="friend" wave="0">
<location>
<point x="-518.19696" y ="0.0" z ="-213.68948" />
</location>
<rotation>
<point x="0.0" y ="0.0" z ="0.0" />
</rotation>
</ship>
</navpoint>
</navpoints>
</mission>
I didn't see any problems with the mission or script, and FC didn't tell me that there was an issue, I checked it to make sure it didn't say anything.