Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: TrashMan on October 04, 2004, 01:41:18 pm

Title: Anyone know?
Post by: TrashMan on October 04, 2004, 01:41:18 pm
- where to find a few of Aldo's Pirate fighters?

- How to work with those consistent variables? (so the hull of a ship is carried over to the next mission, or a few mission after that)

I'm trying my hand at making a campaign here..
Title: Anyone know?
Post by: magatsu1 on October 04, 2004, 02:22:13 pm
Red Alert Carry Status. Somewhere in the ship editor. I forget where.
Title: Anyone know?
Post by: Mad Bomber on October 04, 2004, 03:51:12 pm
Check in Aldo's sig. It should be somewhere in there.
Title: Anyone know?
Post by: NGTM-1R on October 04, 2004, 04:26:58 pm
Standalone models on Aldos website.
Title: Anyone know?
Post by: TrashMan on October 04, 2004, 04:57:11 pm
Yeah, but what I want the ship to appear a few mission after that one wiht the same hull strenght?

Or. dependant on which ships survived mission 1, several DIFFERNT ships will appear in mission 2...
Title: Anyone know?
Post by: karajorma on October 04, 2004, 06:11:51 pm
Persistant variables are pretty simple to use. Just declare them like you would a normal variable in the first mission but check the persistant variable button and then repeat the process in the second mission.

At the end of the first mission use

modify-variable
-variableName(defaultvalue)
-hits-left
--ship name

when the ship appears in the second mission use

when
-has arrived
--ship name
-set-subsystem-strength
--hull
---variableName(defaultvalue)

When you play the mission in the tech room the hull will be set to default value but when you play in the campaign it will use the value the hull was at last time.
Title: Anyone know?
Post by: TrashMan on October 04, 2004, 06:28:28 pm
Hmm.. I think I got it... I can allso use the varialbe to let's saay indicate a switch?

Like If I have the GTD X and the GTC Y to escort.

If I lose the X, the destroyerlost variable is set to 1.

In that case in the next mission - if that variable is 0, the GTD X will warp in, if the variable is 1, the GTCv Z will warp in...
Title: Anyone know?
Post by: Axem on October 04, 2004, 06:38:01 pm
Yeah, I used something like that before. In one of my mini-campaigns, a cruiser didn't appear in the last mission if it got blown up in the first one.
Title: Anyone know?
Post by: Night Hammer on October 04, 2004, 08:30:19 pm
I have the pirate stuff if you need it
Title: Anyone know?
Post by: Black Wolf on October 05, 2004, 09:49:44 pm
Quote
Originally posted by TrashMan
Hmm.. I think I got it... I can allso use the varialbe to let's saay indicate a switch?

Like If I have the GTD X and the GTC Y to escort.

If I lose the X, the destroyerlost variable is set to 1.

In that case in the next mission - if that variable is 0, the GTD X will warp in, if the variable is 1, the GTCv Z will warp in...


Yep. Just put an "and, =, variable name, 1" or whatever into the arrival cues.
Title: Anyone know?
Post by: TrashMan on October 06, 2004, 02:41:42 am
Got Aldo's figter already...

I'm begining to love this variable stuff...
Most missions I'm planing are a bit...complex...
With positive/negative effects on the later missions....
Title: Anyone know?
Post by: magatsu1 on October 06, 2004, 09:27:27 am
Quote
Originally posted by TrashMan
Hmm.. I think I got it... I can allso use the varialbe to let's saay indicate a switch?

Like If I have the GTD X and the GTC Y to escort.

If I lose the X, the destroyerlost variable is set to 1.

In that case in the next mission - if that variable is 0, the GTD X will warp in, if the variable is 1, the GTCv Z will warp in...



you could probably do that in the ships arrival cue ie;

previous event true delay-> ship n not dead.
but variables would be the more interesting way todo it.

And karajorma might not talk to me again if I talked you out of using variables...:nervous:
Title: Anyone know?
Post by: Black Wolf on October 06, 2004, 11:10:52 am
Quote
Originally posted by magatsu1



you, could probably do that in the ships arrival cue ie;

previous event true delay-> ship n not dead.
but variables would be the more interesting way todo it.

And karajorma might not talk to me again if I talked you out of using variables...:nervous:


I'm 99% sure that only works in Red Alert missions.
Title: Anyone know?
Post by: Goober5000 on October 06, 2004, 01:05:33 pm
Quote
Originally posted by Black Wolf
I'm 99% sure that only works in Red Alert missions.
You're 99% wrong. :p :D

Is-previous-event-true works with any previous event in the entire campaign.  It's been that way since FS1.
Title: Anyone know?
Post by: Black Wolf on October 06, 2004, 01:16:28 pm
I've been wrong a lot lately. :sigh:
Title: Anyone know?
Post by: TrashMan on October 06, 2004, 07:21:28 pm
So there's two ways to do it?

Aaa...god to know...
*goes pack to plotting*
Title: Anyone know?
Post by: karajorma on October 07, 2004, 04:16:55 pm
Quote
Originally posted by magatsu1
previous event true delay-> ship n not dead.
but variables would be the more interesting way todo it.

And karajorma might not talk to me again if I talked you out of using variables...:nervous:


No I won't :D Personally I believe in using the best tool for the task.

is-previous-event-true is very useful when you're making missions for a campaign. It has an advantage over persistant variables in that when you see

is-previous-event-true
--Mission Name
--Event

It's pretty easy to tell what the event is checking for. This is very useful when you're checking someone else's mission or when you've forgotten exactly how you put the mission together. If you use a PV you have no idea when the variable was set or what the possible range of values for it can be.

However. Persistant Variables also have advantages. Firstly PV's are much simpler if you you're dealing with something like hull strength or percentages of ships destroyed.

Secondly I have no idea what is-previous-event-true defaults to when you play the mission in the tech room. :D Where as a PV defaults to whatever you set the default to be in FRED (This is easily changed too).  This is useful when playtesting a mission where the PV has been used to set a ships hull strength for instance.

Basically its a case of using whatever you feel works best :)
Title: Anyone know?
Post by: TrashMan on October 07, 2004, 04:25:05 pm
Well, there will have to be some bae value to that variable, or else how I'm goina test it. and one played it in the simulator, going by by is-event-true migth screw thing up..
Title: Anyone know?
Post by: Goober5000 on October 07, 2004, 06:13:20 pm
Quote
Originally posted by karajorma
Secondly I have no idea what is-previous-event-true defaults to when you play the mission in the tech room.
It defaults to whatever you want. :D

Read the FRED help.  You can specify an optional third argument, which will be the value of the event in the tech room.

So
is-event-true
--Mission Whatever
--Some Ship Destroyed
--false

makes the tech room pretend Some Ship was never destroyed.

This is how they made the Sathanas default to two beam turrets left in the tech room version of High Noon.  Though they didn't do it quite correctly: although there are two beams left, the game doesn't properly credit you for destroying both of them, and the debriefing yells at you. :nervous:
Title: Anyone know?
Post by: karajorma on October 07, 2004, 06:17:25 pm
Yeah. I've never used is-previous-event-true much recently. I examined most of the SEXPs when I got started but I haven't looked at them recently.