Author Topic: Question about debriefings and variables  (Read 1439 times)

0 Members and 1 Guest are viewing this topic.

Offline Solatar

  • 211
Question about debriefings and variables
This seems like such a simple thing that I'm sure there's an easier way to accomplish this, but what the heck.  I've got a mission with three Poseidon freighters, Theta 1, 2, and 3 - they are not in a wing - carrying Cargo Alpha, Beta, and Gamma respectively.  In order to provide a useful directive for the player, I've got a CargoLeft variable that starts at 3 and decreases each time one of the containers is destroyed.  I can also know at any point how many containers are left, and send different messages accordingly.  For my debriefings, I thought I would be Super SmoothTM and just have three stages, one for each of the three number of possible containers left, coupled with a check that the RTB directive is true to make sure the player doesn't get the debriefing stage if he just randomly jumps out.

For some reason, this doesn't show a debriefing stage.  I'm not sure if my logic won't work (variables are gone by debriefing or something), or if I'm just using the sexps wrong (can I use an equal sign like that, or do I need to query it somehow). Any takers? :P

I just have three of these.
Code: [Select]
- and
   - =
        - CargoLeft(3)
        - 3 (and 2, and 1)
   - is-event-true-delay
        - RTB Pass/Maybe
        - 0
« Last Edit: April 11, 2013, 01:31:16 pm by Solatar »

 

Offline Axem

  • 211
Re: Question about debriefings and variables
That shoooould work. Normal variables are still in the system until the mission unloads (from quitting it or moving on to the next mission).

Could something weird be happening that CargoLeft goes to 0 or some odd value?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Question about debriefings and variables
Yeah, I can't see anything wrong with it either.

One suggestion is to put the same SEXPs into an event and then use the event.log tools in any newer version of FRED to see if they are triggering.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Solatar

  • 211
Re: Question about debriefings and variables
Hmm, I changed the events to reference the event that the RTB directive was chained to instead of the directive itself, and it works as intended.  Maybe it was a problem with an event that returned true with Alpha 1's departure?

 

Offline Axem

  • 211
Re: Question about debriefings and variables
That may be it. Since has-departed-delay looks at the mission log to see if something has left, there probably isn't a point where the game goes "hey, Alpha 1 departed" before it goes "hey, mission's over."