Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Rodo on August 03, 2008, 07:30:27 pm
-
That's my question over there in the subject of this thread... Im using this with a Directive message and when the ship is autodestoyed by the sexp it does not return False aparently..
directive xx
{
and
{
xxxx
xxxx
NOT
{destroyed-departed} //this should turn False when the ship is destroyed but aparently when it autodestructs itself it's not turning true.. is there another way to evaluate this?
}
}
tnks!
rodo.
-
Instead of self-destruct try using sabotage-subsystem hull 101.
-
no, still getting the directive as Active on the directives list...
this is the deal, the deimos jumps in and the player is suposed to destroy it's front beams, but 3 things could happen..
1-Player can destroy the turrets
2-Deimos can be destroyed before destroying the turrets
3-Deimos can jump before destroying the turrets
here's a copy of the events window
even after destroyed, the directive message stays like still valid.
Is there something Im doing wrong?
[attachment deleted by admin]
-
OK which of those scenarios do you want to the directive to become true under?
-
If you only want it to come true under the first set of conditions you do not need to test if the Demios is alive. The game regards destruction of a subsystem and destruction of a ship as different things and will not return true that a subsystem is destroyed just because the ship that carried it has blown up.
-
If you only want it to come true under the first set of conditions you do not need to test if the Demios is alive. The game regards destruction of a subsystem and destruction of a ship as different things and will not return true that a subsystem is destroyed just because the ship that carried it has blown up.
and that's what I want, It should only be true if the two turrets are destroyed,
and it should turn false if the deimos is destroyed or departed.
that's why I used not-> destroyed departed because it should be true all times while the ship is still on sight and not destroyed
but the expresion keeps failing to become false (its included in an and so for that sexp to became false shouldnt make it all false?).
OK which of those scenarios do you want to the directive to become true under?
It's becoming true already, but I cant make it become false.
I got this coding from the sexp of the fs2 campaign mission where the ntf cruicer jumps in front of your convoy and you are ordered to destroy its frw beam so I figured that i would work just fine but it's not helping :S
-
Hmmm. Looking at the code I see you're right. While the directive will turn false if the Deimos leaves it won't if you destroy it because the game doesn't check the log to see if the ship has been destroyed, it simply returns SEXP_FALSE instead of SEXP_KNOWN_FALSE (which would make the directive fail).
The :v: missions are no help either Into the Maelstrom simply cheated and had two directives. To be honest I think they did it cause they had the same problems you did. :) I'd actually have to open FRED to see if I could solve this one without adding a hack to the event (i.e something I know would output KNOWN if the ship is destroyed).
-
Hmmm. Looking at the code I see you're right. While the directive will turn false if the Deimos leaves it won't if you destroy it because the game doesn't check the log to see if the ship has been destroyed, it simply returns SEXP_FALSE instead of SEXP_KNOWN_FALSE (which would make the directive fail).
The :v: missions are no help either Into the Maelstrom simply cheated and had two directives. To be honest I think they did it cause they had the same problems you did. :) I'd actually have to open FRED to see if I could solve this one without adding a hack to the event (i.e something I know would output KNOWN if the ship is destroyed).
I was thinking in Ship-type-destroyed (since is the only deimos) but then again if departed-destroyed does not work I will not be of any use.. I'll try with a variable then.
-
Actually using variables won't help. I had a little think about it a couple of minutes ago and what you need to do is make an event that comes true when the ship is destroyed. Then check if this event is incomplete in the directive.
To be honest I'm starting to think that the subsys-destroyed SEXP not checking if the ship is destroyed or not is a bug. I can't think of any sensible way you could use it where you'd care if it returns SEXP_KNOWN_FALSE rather than SEXP_FALSE except in cases like this where it's doing the wrong thing.
-
Actually using variables won't help. I had a little think about it a couple of minutes ago and what you need to do is make an event that comes true when the ship is destroyed. Then check if this event is incomplete in the directive.
To be honest I'm starting to think that the subsys-destroyed SEXP not checking if the ship is destroyed or not is a bug. I can't think of any sensible way you could use it where you'd care if it returns SEXP_KNOWN_FALSE rather than SEXP_FALSE except in cases like this where it's doing the wrong thing.
well anything that makes me work more that it should leads me to think it's a bug, Ill try with another event as you suggested when I come back home today.
Edit:
Yes as yoy said.. if destroyed it does not return true but it seems it only happens with the Official release 3.6.9 exes as I've tryied a special mission with this directive and it's working just fine in the new trunks like this one http://www.hard-light.net/forums/index.php/topic,55508.0.html
Anyway replacing Departed_Destroyed by two individual Departed / Destroyed sexp is working just fine now in both versions of executables.