Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Starman01 on June 03, 2004, 03:44:30 pm

Title: SEXPS-Problem
Post by: Starman01 on June 03, 2004, 03:44:30 pm
Hello,

can anyone pls tell me how I can add 5 "OP"-variables into
the same hierarchy-level like this :
(http://www.starman.ag5.de/pics/strange.jpg)

I tried for a long time, and now I getting frustrated. Can someone
pls explain this to me.

Thanks
Title: SEXPS-Problem
Post by: Anaz on June 03, 2004, 06:00:27 pm
right click on the "when" and go to "add "..?
Title: SEXPS-Problem
Post by: Starman01 on June 04, 2004, 08:48:45 am
Sorry, but that wasn't really helpful. As I said, I tried a long time (i now
how to edit sexpression btw, maybe not everything, but the most)

There is no "op"-operator selectable. I can only add a new
"when"-operator, but he will drop into a lower hierarchy-level.

Maybe it can be done with the "add variable", I haven't get this
to work until now, so I'm not sure.

It is very important, that all operators are on the same level (left border).

Any other ideas ?

@Kazan : You around here somewhere ? Actually you created that
sexpression, so maybe you can give me the hint I need ?
Title: SEXPS-Problem
Post by: Blaise Russel on June 04, 2004, 09:02:54 am
Why not just make another event with the same 'when' SEXP and stick your operators in there? Or even another event chained to it with a 0 delay?
Title: SEXPS-Problem
Post by: karajorma on June 04, 2004, 09:32:55 am
Okay. I've read this thread back and forth about 5 times now and I'm still none the wiser about what you're asking for Starman.

An event is divided into two parts.  One or more boolean operators which decides whether the event occur or not and action operators that say what to do when the boolean part evaluates to true.  

At first I thought you were saying that it's impossible to have 5 action operators but that is obviously not true unless you're experiencing a bug with FS2_open

(http://homepage.ntlworld.com/karajorma/freespace/Misc-Pics/MultipleSEXPs.jpg)

So now I'm at a loss as to what you're doing. Try explaining it in english terms rather than as a FRED problem and I might get it :) What do you actually want this event to do?
Title: SEXPS-Problem
Post by: Tolwyn on June 04, 2004, 09:48:59 am
he is trying to create autopilot ;)

When you push a button, lock controls, activate time compression, point the ship to the nav point and off you go ;)
Title: SEXPS-Problem
Post by: Starman01 on June 04, 2004, 10:15:11 am
Sorry if it isn't that clear, my english grammar isn't always very good :D

Technically Tolwyn's right, except that it isn't possible right now to
active/deactive time-compression using a script, but I surely hope
it will be one day, otherwise this is all useless. ( I always run into
enemy fighters with at least 8fold time-compression and got shoot down 8times faster :) ). But back to the topic.

I don't want to make that script, I just can't rebuild it in a new
mission. I can't add 5 operators "red op's" that way, every time I add a new one, it is one more step to the right.

***a few minutes later****

While writing my roman here and making pictures, I figured it out :cool:

Anaz wasn't so wrong after all (beside the "add something" :) ), I
just  needed to right-klick the "when" and add another "conditional
"when" ". By doing so, I can get as many operators "op" in the same
line (left border), which I meant with hierarchy.

Just for explanation, this script is really good. You have a nav-point "1"

After activating a goal, you need to press "1". Then your fighter
automatically faces the nav-point and starts autodriving to it,
ignoring all player commands to the ships. (A message appears
on the hud saying "autopilot" engaged.)

As soon as you are in a specific range to the navpoint, the control
will be returned to the player, displaying "autopilot disengaged"

So far, so good. Only thing missing now is the possibity to start/stop
the time-compression within here, (and the possibility to end the
time-compression when enemys are near, must be scripted too I
guess), cause they are also affected by the time-compression and  beat you up in notime.

This needs attention of the fredder too, to watch out if he
adds enemys in the flight-paths. For good effect, the nav-points are more than 40.000 meters away from each other.)

Another problem is, that when you are not
in control, you cannot target anything, so you can't see the distance
to the navpoint dropping down.

BTW, the effect when approaching an asteroid-field that way it
extrem  cool :)

(another edit) When we are already that far, how hard can it be to add an automatic switch to external view by activating time-warp,
and back when ending it ? Then we are very close to the original
WC-autopilot-function we all love, and it wouldn't be useful for
Freespace too, right ? Only problem would be, that this external
view will be no flyby, but better than nothing.
Title: SEXPS-Problem
Post by: karajorma on June 04, 2004, 10:37:28 am
Post a pic of the new event. I'm still a little confused here.
Title: SEXPS-Problem
Post by: Starman01 on June 04, 2004, 12:34:30 pm
This is the event that activates the autopilot :
(http://www.starman.ag5.de/pics/event1.jpg)

And this here does end the autopilot and gives back the control
to the player:
(http://www.starman.ag5.de/pics/event2.jpg)

I haven't worked much with it, I planned to do it this weekend, when
I start making new missions. Maybe it can made in another way, and
maybe I have to change it that way, that the autopilot can only be
activated, when certain conditions are met (i.e. Nav2 can first be
accessed after you reached Nav 1. Kazan did this by chaining the
events, looks like a good way to me.

Nevertheless, what Kazan made here works pretty good.