Author Topic: I hate mission objectives  (Read 6372 times)

0 Members and 1 Guest are viewing this topic.

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
I hate mission objectives
Hey there,

I really don't understand why FRED has to be so complicated when it comes to simple mission objectives. I have a
problem again, so any help would be appreciated.

Once again I'm trying to make a mission objective "hold formation" which checks the players distance to a certain ship over a certain time.
I already have a similar one in another mission and Karajorma help me creating it, which works fine now. I copied it into the other mission,
but here it refuses to work (goal shows up and can be completed, but it wont get FALSE).

Here is the situation :

30 Seconds after the event "M_List Sandmann11 bis Major15" has been executed, the goal "hold formation" should show up (which it does)

Now the player must stay within 500 meters to the ship alpha 1 until 55 seconds after event "M_List Pirate 1 to Ninja b" has been executed.
(that just a certain dialogue going on in that time, and the player is not allowed to break formation until he gets his order. If the time is up, he is allowed to attack and the goal becomes true (which also works).

But, any time as long the goal is incomplete the player shouldn't be more than 500 meters away from Alpha 1, if he is, then the goal is false (and the mission will end). And it's that FALSE, that isn't working :(

Theoretically it's the same like in the working mission, I just had to change a trigger. Here is what I have :



« Last Edit: October 31, 2006, 01:35:47 pm by Starman01 »
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: I hate mission objectives
Try this, which should be easier:

Change "goal keep formation" to "goal failed".  The event should become true if the player is more than 500 meters away from Alpha 1.  If the event becomes true, the mission fails.  If 55 seconds have passed since "lock weapons on attacker", and the event hasn't become true, then the player is allowed to attack.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: I hate mission objectives
The Greater than and Less than sexps have been spotty for months now. Try swapping it over to a less than (and swapping your data around of course) and seeing if that helps.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: I hate mission objectives
The Greater than and Less than sexps have been spotty for months now.

:wtf:

Is this in Mantis?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I hate mission objectives
The Greater than and Less than sexps have been spotty for months now. Try swapping it over to a less than (and swapping your data around of course) and seeing if that helps.

I've said before that if you can find a single provable case of that happening I'm happy to take a look at it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: I hate mission objectives
The Greater than and Less than sexps have been spotty for months now. Try swapping it over to a less than (and swapping your data around of course) and seeing if that helps.

I've said before that if you can find a single provable case of that happening I'm happy to take a look at it.

That's the problem - if they were broken I would. As it is they're.... spotty. (and I'm more afraid I'm doing it wrong and am going to look like an idiot :p)

OK. Example (I can attach the mission if need be) - the attached triggers at the very beginning of a mission when it shouldn;t (the caleb is 4200m away. Other times though it's the opposite - the sexp wont trigger at all no matter how close two objects get. It's weird. The only thing that convinces me I'm sane and not imagining the whole thing is the fact that VA has encountered it as well.


[attachment deleted by admin]
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

  

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: I hate mission objectives
When
 is-event-incomplete
goal trigger 1
and
not
is-event-incomplete
goal trigger 2


That anything to do with it, I cant make out how any thing would call an ending on this :confused:
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: I hate mission objectives
Don't ask me, I have to admit that I really don't understand the deeper sense of this 3 SEXP. Kara made them for me, and they work fine in the other mission.

Only difference there, the time the goal should be false or complete is when the leading ship reaches a waypoint, and in this new example when an event is true a certain time.

I also have to admit to my shame, that I'm not totally sure how to build Goobers suggestion into an event. Could you please post me the code/synthax ?

As for the "greater than" or "less than" sexp, I use them alot in my missions, and at least with them I never had any problems.
« Last Edit: November 01, 2006, 12:34:07 pm by Starman01 »
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: I hate mission objectives
The Greater than and Less than sexps have been spotty for months now. Try swapping it over to a less than (and swapping your data around of course) and seeing if that helps.

I've said before that if you can find a single provable case of that happening I'm happy to take a look at it.

That's the problem - if they were broken I would. As it is they're.... spotty. (and I'm more afraid I'm doing it wrong and am going to look like an idiot :p)

OK. Example (I can attach the mission if need be) - the attached triggers at the very beginning of a mission when it shouldn;t (the caleb is 4200m away. Other times though it's the opposite - the sexp wont trigger at all no matter how close two objects get. It's weird. The only thing that convinces me I'm sane and not imagining the whole thing is the fact that VA has encountered it as well.


I've made events exactly like that countless times with no problems. Maybe it's only an issue with specific models? (if their center points are messed up or something; that's about the only explanation I can think of)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I hate mission objectives
Actually after looking at the issue quickly I can't see any good reason why you shouldn't expect the Greater Than event to go off at missions start.

The event triggers when the two are 2.5 km away and at mission start they are 4.2km away.

I'm happy to look at the whole mission though if need be.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: I hate mission objectives
I also have to admit to my shame, that I'm not totally sure how to build Goobers suggestion into an event. Could you please post me the code/synthax ?

Okay, see attached.  This is much cleaner, IMHO.

[attachment deleted by admin]

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: I hate mission objectives
Much more efficient  :nod:
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: I hate mission objectives
Not really. Which event is responsible for displaying the objective text ? Even more important, while the third event works more or less,
the second one will become always true as soon as I increase the distance to the other ship. So, even if I stay in formation until the one
event has been executed 55 seconds and I theoretically completed the goal "keep formation", the other will still become false once I start into battle (which leads into a selfdestruction in my mission).

I need a goal, that checks the status at a certain time. If the player is at this time in formation, it's completed. If he breaks formation anytime between the start of the goal and before it's finished (the trigger time is up, in this case the 55 seconds of that particular event) it's FALSE.

After the goal has been completed, the player is allowed to break formation. Any other suggestions ?

MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I hate mission objectives
It's efficient. But it's not an improvement on Starman's design. In fact it's going to have the exact same effect as Starman's with the added bonus that it won't even show up until it's completed.

The game uses is-event-true-delay as a pointer as to when to display the directive in addition to when the directive is completed or not. It's a completely retarded way of doing things and it completely runs counter to the way people would expect directives to work as no other SEXP has this effect. It might not be a bug but it's still a ****ing stupid use of an undocumented side effect.

As a result Goobers event simply won't work. It won't even be displayed until 55 seconds after it should have been regardless of whether it's completed or not. Even worse that directive is always going to be true anyway because as soon as the 55 seconds are up the directive will check if the player left formation the second that he was told to get into formation because not (is-event-true-delay) with a delay of 55 can only read as false 55 seconds after the player left formation. 


Now for the promblem itself. The events you've displayed don't check if the player has ever broken formation, merely if he is in it at the end of the time limit. Is that the cause of the problem? Are you breaking formation then rejoining it and still having it evaluate to true? Cause that's exactly what it should do. If you want the event to fail if the player ever breaks formation that can easily be done but first lets see if I'm right about the cause of your problem.
« Last Edit: November 02, 2006, 01:09:44 pm by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: I hate mission objectives
How about I send you the mission file I have ? Could you take a look into it ? It should work with the old beta-build you have, since I didn't change any ship models. Like I said, the goal itself works as it should, it just never get false.

Theoretically it should be more or less the same what you build for in the other formation goal. Only this time, there is no waypoint-distance trigger, but an "is-event-true-trigger".

Again, as long as the goal is incomplete (white letters in the objective box) the player is not allowed to break formation. After the objective is completed, he is allowed to do so.
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I hate mission objectives
Before you do that run a test for me. Run the mission and break formation immediately. Then don't ever go back into formation. If when you do that the event doesn't mark itself as false I'll take a look at it. If it does mark itself as false then I'll tell you how to get the effect you actually want. :)

My solution to your problem involves adding something to your current directive event and it's pointless doing that if it's not working cause as far as I can see it should become false if the player is not 500m from Alpha 2 when the formation flying display ends.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: I hate mission objectives
It's efficient. But it's not an improvement on Starman's design. In fact it's going to have the exact same effect as Starman's with the added bonus that it won't even show up until it's completed.

:wtf: I didn't even put the directive event in there.  Are you sure you're not color-blind? :p

My intent wasn't to minimize the number of sexps needed, it was to make the sexps be as clear as possible.  In my approach I would need to put an extra two events for a directive trigger + directive.

I suppose I would need to create an actual mission for you to see the whole example.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I hate mission objectives
I assumed you must have missed the directive cause couldn't see what help your event was. :p

Starman knows how to build an event that comes true under the conditions he wants but what he wants is a directive that does the same. Seeing as you can't use is-event-true-delay with the events you've posted he's still going to have to rely on some mishmash of is-event-incomplete SEXPs to make that directive work.

Unless you're suggesting he completely gives up on the idea of having a directive at all.


Besides Starman is correct that as soon as the player does attack the enemy he'll still get the you have failed message :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: I hate mission objectives
Are you sure you're not color-blind? :p

If that was related to me, believe it or not, I am colour blind :D  Having red and black letter in the same text is very difficult for me to distinguish. Life sucks. :)

Regarding my SEXP's above, the following happens :

I was wrong in one point, the Goal get's false, just not to the correct time (though I could swear it didn't worked the first time).

Now, when I brake formation before or after the goal is started, it becomes true or false only when "M_List pirate1 to ninjab" has executed 55 seconds. So like I said, this time is only meant for the true-value, the false-value should be initiated anytime I break formation (after the goal has been executed, or better, a few seconds later to give the player the chance to get into formation) . Can one of you guys help me ? :)


(edit) BTW, since the first time you help me Kara, there was no "is event true" possible in a directive, but it is now :) . Maybe it can be done easier now.
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I hate mission objectives
You still can't use is-event-true-delay in a directive the way you'd think you could. It's ****ing idiotic but Taylor looked up the code and realised it wasn't a bug. That said if it's possible (i.e not used in the retail FS2 campaign and easy to fix) we should change it anyway and backwards compatability with anything else be damned.

Having read your description of the problem its pretty obvious that it's working exactly the way I designed it to. The way to make it work the way you want is simple. Add this event to the mission.

When
-and
--is-event-true-delay
---M_List Pirate 1 to Ninja b
---0
--not
---is-event-true-delay
----M_List Pirate 1 to Ninja b
----55
-- >
---distance
----Alpha 1
----Alpha 2
---499
-self-destruct
--Some unimportant ship

Now simply add a not-is-destroyed SEXP to the directive. As soon as the ship blows the directive will turn red. Same goes for if you make something warp out instead.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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