New FC campaign; Wing Commander: Affliction

Iceblade

Admiral
Those examples, though, are not simple (not that simple anyway). I meant start with the basics: setting up the lua, setting up simple triggers, and using variables.

I am currently writing up a tutorial just for this right now (not quite finished yet, but it is close): FC Scripting

Edit: Okay, the tutorial is now finished but I will probably improve/expand it a little later on.
 

Winnyfred

Rear Admiral
Wow, me= rere. The reason my scripts didn't work was because I forgot the

function init()
Mission_setScriptControl(true);
end

That's what was screwing me up, and it was obvious too. :eek: Sorry for wasting your time eddieb and Iceblade. Nice tutorial to, it is sure to help me :D.
 

Winnyfred

Rear Admiral
I've looked at everything, but my script is causing me to be booted out of the game right after the launch sequince is over, any explination? my lua file is this:

dofile "flightcommander.lua"

function init()
Mission_setScriptControl(true);
Mission_setAutopilotEnabled(true);
end

function Saviour()
Ship_setForceEject("Saviour", ture);
end

-- call init on startup
init();

My mission file is this:
<?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="4" numwaves="1">
- <ship name="tigershark" pilot="player" comm="casey" video="helmet" autopilot="true" alignment="friend" wave="0">
- <location>
<point x="21.368948" y="0.0" z="149.58264" />
</location>
- <rotation>
<point x="0.0" y="80.0" z="0.0" />
</rotation>
</ship>
- <ship name="midway" pilot="Uniden" comm="midway" video="midway" autopilot="false" alignment="friend" wave="0">
- <location>
<point x="1597.2222" y="50.0" z="41.666664" />
</location>
- <rotation>
<point x="0.0" y="251.0" z="0.0" />
</rotation>
</ship>
- <ship name="tigershark" pilot="Maniac" comm="maniac" video="helmet" autopilot="true" alignment="friend" last_autopilot_nav="1" wave="0">
- <location>
<point x="-21.368948" y="0.0" z="-192.32053" />
</location>
- <rotation>
<point x="0.0" y="92.0" z="0.0" />
</rotation>
</ship>
- <ship name="tigershark" pilot="Saviour" comm="maestro" video="helmet" autopilot="true" alignment="friend" last_autopilot_nav="1" wave="0" scriptid="Saviour">
- <location>
<point x="-12.0" y="0.0" z="-49.68" />
</location>
- <rotation>
<point x="0.0" y="84.0" z="0.0" />
</rotation>
<script oncreate="Saviour" />
</ship>
</navpoint>
- <navpoint numships="3" numwaves="1">
- <ship name="manta" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
- <location>
<point x="-52.0" y="0.0" z="-98.56" />
</location>
- <rotation>
<point x="0.0" y="0.0" z="0.0" />
</rotation>
</ship>
- <ship name="manta" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
- <location>
<point x="50.559998" y="95.0" z="-39.36" />
</location>
- <rotation>
<point x="0.0" y="0.0" z="0.0" />
</rotation>
</ship>
- <ship name="manta" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
- <location>
<point x="-40.8" y="0.0" z="90.48" />
</location>
- <rotation>
<point x="0.0" y="0.0" z="0.0" />
</rotation>
</ship>
</navpoint>
- <navpoint numships="2" numwaves="1">
- <ship name="manta" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
- <location>
<point x="168.32" y="0.0" z="-38.239998" />
</location>
- <rotation>
<point x="0.0" y="0.0" z="0.0" />
</rotation>
</ship>
- <ship name="manta" pilot="" comm="bug1" video="bug" autopilot="false" alignment="enemy" wave="0">
- <location>
<point x="133.55592" y="0.0" z="-38.731216" />
</location>
- <rotation>
<point x="0.0" y="0.0" z="0.0" />
</rotation>
</ship>
</navpoint>
- <navpoint numships="1" numwaves="1">
- <ship name="midway" pilot="Uniden" comm="midway" video="midway" autopilot="false" land="true" must_survive="true" alignment="friend" wave="0">
- <location>
<point x="13.599999" y="0.0" z="-13.92" />
</location>
- <rotation>
<point x="0.0" y="0.0" z="0.0" />
</rotation>
</ship>
</navpoint>
</navpoints>
- <objectives>
<objective name="Head to the Uniden" category="primary" default="complete" />
</objectives>
</mission>


Sorry for the inconvienince.
 

Iceblade

Admiral
Are you given an error message? And when you say booted out of the game do you mean out of the whole game or just your mission?

Hey wait, you misspelled true in your force eject.

Oh...yeah, I see what you mean eddie. I don't suppose the init() is all that necessary either, but it is still a good idea to go ahead and add it in for future use.
 

Winnyfred

Rear Admiral
GOT IT! The script is working! WOHO! It was the spelling should've checked that. Thanks Iceblade that really helped me, I owe you another steak dinner :) .
 

Winnyfred

Rear Admiral
The pilot is ejecting even if i use the debug kill he still ejects. It is finally ready to be scriptied everywhere! At last, more complex missions where your buddy can eject always! I can now work on part 2 without the fear of losing your friend Saviour!

I want to give part of the ending away, in part 3 Saviour dies when you go out to save him and his wing. There is only an ejection pod left in the nav point when Mage ejects. Sad sad sad :( :( :( . The enemies there dominated them and when Mage ejected they were gone, when you get there the wing and Saviour are dead and the enemies stealthed to ambush you...
 

Winnyfred

Rear Admiral
Oh, the first steak dinner you ask? Came from... well...um...it came from...does it really matter? Any I am starting on part 2 of 3 for Affliction. :)
 

Winnyfred

Rear Admiral
I am getting better at scripting basic stuff, I've set up easy things like the force ejects, set HP, armor shields, etc. I'm sure you will be more impressed with part 2 than with part 1.
 

Iceblade

Admiral
Well, if you can master variable usage and gain a bit of proficiency in programming logic, then scripting is a breeze (well after you get used to the syntax...which was the learning curve for me as I was used to WCPpas's syntax).
 

Winnyfred

Rear Admiral
Don't get me confused any more than I was starting the scripting :p. I really don't want advanced scripts, just the ones I can practice, it took me almost 2 months of trial and error to figure the simplest out.
 

Winnyfred

Rear Admiral
Part 2 missions released! Just 2 though, a defend the carrier, and a patrol mission, both scripted, not heavily, but lightly.
 

Iceblade

Admiral
Just a quick suggestion about your sig. I think it would be a good idea to have a link to your mod's website.

Just a thought.
 

ChrisReid

Super Soaker Collector / Administrator
Well I tried it out, looks nice, although there are quite a few spelling errors in the briefings.

That's a bit annoying. Typos are one thing, but the spelling and word errors seem all over. You should at least run your text through a spell checker. Stuff like that should be easy compared to actually making space sim campaigns. The grammar is kind of bad too:

"Started in October 2006, Wing Commander: Affliction, a campaign for the Flight Commander, was started."

"You wont accept it, everyone else will, you won't, when everything is gone you will still fight, and fight to your last breath you will."

Do you have any screenshots? The splash screen just seems to be a Tiger Shark with some kind of dirty font on the top.
 

Iceblade

Admiral
Hey, Winnyfred. If you need a proofreader, I should be able to do this in a fairly short period of time (as limited as that is right now).
 

Winnyfred

Rear Admiral
:( I'm trying, but notepad doesn't have a spellchecker, and the screen shots, I looked at his key bindings page the Prt Scrn button doesn't seem to take screen shots (if that is the key that does.)
 

Iceblade

Admiral
You have to exit the game and paste the shot into paint--then save. I usually just use the windows key on my keyboard to get back to the taskbar to open paint, paste the screenshot, and save.

The errors I just read are indicative of problems that can't be fixed by a spellchecker or even Microsoft Word's grammar check (which is pretty weak anyway).

Briefing mission 1 Old said:
Since you are leaving the acadamy, an F-103 "Pirahna" will suit you.
Leave the Acadamy, and proceed to nav 2.
Once at Nav 2, eliminate all enemy forces. You may encounter a Moray wing.
Proceed to Nav 3 when you have completed your objectives at nav 2.
Land on the carrier "Uniden" upon completion, she will jump in.

Okay, a little point blank and it doesn't flow (or read fluently). Here is a better way to write this.

Briefing mission 1 New said:
Due to this being your first mission, you will fly an F-103 Pirahna.
Leave the Acadamy and proceed to nav 2.
Once at Nav 2, eliminate any enemy forces you encounter. You will likely face a Moray wing.
Proceed to Nav 3 when you have cleaned out nav 2.
The carrier Uniden will jump in at nav 3.
Land on the carrier once it arrives.
 
Top