Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: 0rph3u5 on July 31, 2007, 09:34:49 am
-
I've got this evacuation-directive here (attachment) which is not working as it is supposed to be(From HellGate Ikeya)
as you can see it should check if Iota 1/2/3/4 have undocked the Galatea before being destoryed (after they have undocked they get self-destructed)
the problem is that it still turn false once a transport has undocked and self-destructs
any one got a better idea?
ps. I cannot go with 4 spererate directives since there are 5 other directives involved
-
You've made a fundemental mistake about the AND SEXP there
And
-and
--A
--B
-and
--C
--D
Is exactly equivalent to
and
-A
-B
-C
-D
So as soon as transport explodes before the rest have undocked it's all over.
From your description of the misson if a ship has undocked it can't have been destroyed prematurely. I'd skip the destruction test and just check that all 4 had undocked.
-
Hehehehe...
This like that happen..allways find the simplest thing to check with SEXPS.. :nod:
-
oh... they can be destroyed earlier in the mission (it makes no sense evacuating vessels that are in no danger of being blow to dust by shivan bombs)
actucally I just need the "is destroyed delays" to keep the counter alive -- but I remeber doning a similar event earlier which worked...
*goes off looking for that other mission*
-
This sounds like a good time to pimp and-in-sequence. It needs some love anyway, hardly anyone ever uses it. If you use that, then instead of the "is-undocked" + "not is-destroyed" that causes the error, you can use "is-undocked" + "is-destroyed" in that exact order only. In other words, if the destruction happens before the undocking, it should fail.
-
Yeah I agree that and-in-sequence would be useful in certain situations but I don't actually think you need it here. In fact I think you have a greater chance of screwing things up.
oh... they can be destroyed earlier in the mission (it makes no sense evacuating vessels that are in no danger of being blow to dust by shivan bombs)
They can be destroyed earlier but if they are, they can't undock later. :)
I'm pretty sure the undock SEXP will return false for a ship that has been destroyed before it could undock. Which means you don't need to check for destruction at all. If a ship is blown up without undocking the directive will immediately become uncompletable.
-
Well, if they are allowed to die earlier on, then yeah it'd screw things up. Overlooked that before.
Another method is to use a proxy, and have the directive event not check for the docking at all but for something else that is more easily controlled. Say, the destruction of invisible fighters in a wing named with invisible characters that sit 200.000 km outside the play area. Then, as each transport undocks, you can trigger changes in the directive count by self destructing the fighters. It's an ugly hack but it'll do the job if you insist on having a count in the directive.
-
Actually on greater reflection I'd say that you could go with Shade's suggestion. If you are self-destructing the pods after they have undocked you'll have the directive come true when all 4 pods explode and turn false if any pod is killed before it is undocked.
The question is whether this delay between undocking and self-destruction is important to you.
-
Aren't variables easier to use than ghost fighters? :wtf:
-
Not if you want the directive to include a count. Variables won't do that.
-
You can't have variables displayed in directive text.
Although come to think of it that might be a nice feature. *scribbles it down on his wishlist*
-
This would be a whole lot easier if you could invalidate the arguments of another event BTW
but while you were trying to find a simple and smooth solution I found my own
--- it is complicated but it is something
the counter is on and it is counting backwards :D