Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => FRED Academy => Topic started by: Cetanu on October 02, 2003, 08:54:52 am

Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Cetanu on October 02, 2003, 08:54:52 am
Today only one short exercise to train the mind of young Fredders... ;)

In The Die Is Cast (cet_m06) I wanted one friendly Elysium (SOC BP2) to capture 1 of 3 fleeing Argo transports (Kappa 1-3). After disabling and scanning Command decides which one is to be captured. Sounds simple enough? Well, to execute it properly it takes some events to do it right.

First of all the Kappas arrive and go to their waypoints to jump out of the system - one event to validate the capture goal (Kappa), one event for disabling and one for scanning  - both of the later check if one of the Argo transports gets destroyed or jumped out before Command could decide which one is the capture target.

(http://members.aon.at/caphyr/cafl0201.gif)

Once this is done Command decides which one - the value gets stored in the variable Kappa.

(http://members.aon.at/caphyr/cafl0202.gif)

Let's assume it is Kappa 1 - the following events need to be done repeatedly for Kappa 2 and 3 as well. The chained "Capture Kappa ..." events have a check on "RTB bad 2" - an event that gets true if the Kappa goal failed.

(http://members.aon.at/caphyr/cafl0203.gif)

Two chained events deal with the SOC BP 2 - the first is a protect directive for the players that  also has orders for that Elysium once it docked with an Argo.

(http://members.aon.at/caphyr/cafl0204.gif)

The event "SOC BP 2 bye" makes sure the Elysium leaves the area if it can't capture the designated Kappa transport.

(http://members.aon.at/caphyr/cafl0205.gif)

One Kappa captured the other 2 should be destroyed (with directives of course). 6 events to make sure the right one is on the kill list. ;)

(http://members.aon.at/caphyr/cafl0206.gif)

And finally the simple Kappa goal:

(http://members.aon.at/caphyr/cafl0207.gif)

Hope to see a docking manoeuvre soon that  goes up and  beyond that in complexity...  :)
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Setekh on October 02, 2003, 09:39:29 am
He does it again. :):yes: Make sure you keep these in a safe place (ie. not just on the forum)... we can turn them into fully-fledged tutorials for HLP 2.0, you know. :nod:
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Hellbender on October 02, 2003, 12:46:14 pm
Keep em coming :)

H
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: karajorma on October 02, 2003, 03:12:47 pm
Excellent work as always :yes:
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Hippo on October 02, 2003, 03:38:26 pm
Give the man a prize/cookie/title!
Title: Cetanu, we are in your debt!
Post by: GT-Keravnos on October 04, 2003, 02:06:28 pm
More lessons=more missions=more campaigns=more fs2!

That can only be a good thing.

Thank you so much, not just for myself, but for those who are too "ashamed" to admit that they forgot FRED, ever since the advanced tutorial!

Please, do continue!
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: magatsu1 on October 04, 2003, 04:42:13 pm
my head hurts....

hell is finding "modify variable" doesn't work after spending several hours on a mission that you find needs it.

hey, is there a limit to the size of any one SEXP ?
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: HotSnoJ on October 04, 2003, 04:58:47 pm
OT-ness (slightly)

Why isn't this in the FS modding forum?
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Black Wolf on October 04, 2003, 06:25:42 pm
Read the Forum summary for FS Campaigns
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Setekh on October 05, 2003, 02:00:50 am
Quote
Originally posted by HotSnoJ
Why isn't this in the FS modding forum?


Which reminds me, I have some threads to move (Fredding ones belong here). :)
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Cetanu on October 05, 2003, 07:18:02 am
@magatsu1 - I have some troubles to understand what you really ask, but maybe your modify variable doesn't work because you didn't create a variable in the first place?

I never noticed a limit for sexps used in an event, just a total limit for sexps in a mission - in vanilla Fs2/Fred2 it was something near 100.
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: magatsu1 on October 05, 2003, 03:44:41 pm
I mentioned this when I first "appeared" on here.

Basically the event breaks down when I save, creating more lines of code than I actually put in. Doesn't seem to do it if the event is the first (or so) put into the mission.

Have you ever experienced that Cetanu ?:)
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Cetanu on October 05, 2003, 09:42:10 pm
the variable is one word without a space inbetween?
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: magatsu1 on October 06, 2003, 12:33:00 pm
search for the thread "New Guy with Questions" .:)
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: Cetanu on October 06, 2003, 04:36:45 pm
I've gone through your other topic, but you didnt answer my question.

See, the only time I had seen messed up modify-variable sexps when someone tried a variable name with a space in it (or maybe something like "ยง$%&/()=?*'_:, etc) - so again: what was the name of the variable you tried?

If it wasn't some mistake like the above, I have no other idea what could have corrupted your sexp.
Title: Cetanu's Advanced Fred2 Lessons - part 2 (with images)
Post by: magatsu1 on October 07, 2003, 02:12:51 pm
the name was somethin' like "destroyercue".

but i didn't know the name made any difference, so I have at least learned that,:)