Author Topic: problems with a directive  (Read 2171 times)

0 Members and 1 Guest are viewing this topic.

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
problems with a directive
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
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: problems with a directive
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.
« Last Edit: July 31, 2007, 10:27:25 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Re: problems with a directive
Hehehehe...

This like that happen..allways find the simplest thing to check with SEXPS.. :nod:
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: problems with a directive
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*
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline Shade

  • 211
Re: problems with a directive
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.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: problems with a directive
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.
« Last Edit: July 31, 2007, 03:44:01 pm by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Shade

  • 211
Re: problems with a directive
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.
« Last Edit: July 31, 2007, 03:52:02 pm by Shade »
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: problems with a 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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Re: problems with a directive
Aren't variables easier to use than ghost fighters? :wtf:
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Shade

  • 211
Re: problems with a directive
Not if you want the directive to include a count. Variables won't do that.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: problems with a directive
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*
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: problems with a directive
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
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."