Advertisement

Author Topic: Variables from mission in outros?  (Read 1095 times)

0 Members and 1 Guest are viewing this topic.

Anmac

  • Guest
Variables from mission in outros?
« on: 20 Aug 2002, 18:05:23 »

Can you use a variable from the init.sqs file or set in the mission, in an outro.

ie

How do I have 6 different endings and two different outros WITHOUT using the 'loose' ending, which doesn't let you have a debriefing.

I have different debriefings. It's the outros that are getting me.

I have tried using a variable in the init file that will run one outro if it's true and another if false.  But the value doesn't seem to carry over past the mission.

Tell this poor fool what he's doing wrong, if anything.

*can't believed I'm asking this*

Offline KTottE

  • Former Staff
  • ****
Re:Variables from mission in outros?
« Reply #1 on: 20 Aug 2002, 18:14:42 »
I don't think you can have two different Outro - Wins.
And OFP:Res lets you bring variables across, that's how they save the weapons from one mission to another.
If you have it, I suggest peaking inside the Resistance.pbo campaign file and see how they did it.
Combination of exit.sqs and init.sqs.

One idea that just popped into my head was that you save a variable in the end of the mission, and start the outro with triggers. Two of them.
Trigger1 looks for the condition: outro1
Trigger2 looks for the condition: outro2
and then you have Outro - loose for the rest.
And in the end, when you complete End1 you get outro1
End2 gets you outro2
And the rest gets you Outro - Loose, or am I missunderstanding you?

Does that sound like a plan?
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Anmac

  • Guest
Re:Variables from mission in outros?
« Reply #2 on: 20 Aug 2002, 18:27:44 »
T or F - End Loose does not let you set a custom defrief.

T or F - By using 6 different custom defriefings (end1, end2 and so on) I can only have one outro

I tried the two trigger idea but the variable didn't carry over from the mission.

I will look into the exit.sqs file idea.  That sounds like a winner.   :D

Although campaigns work a little differently.

Thanks.

[update]

Hey those exit.sqs files should be required reading!

A big thanks to BIS for adding comments to their scripts.

I think it just might work... will let ya know... :o
« Last Edit: 20 Aug 2002, 18:32:17 by Anmac »

Offline KTottE

  • Former Staff
  • ****
Re:Variables from mission in outros?
« Reply #3 on: 20 Aug 2002, 18:34:09 »
No problem, and to answer your questions:

Outro - Loose makes you loose the mission. Finito. You don't progress. You don't get a debriefing. You get: "Sorry sucker, you died"
At least, that's all I've ever seen with Outo - Loose.

There is only one Outro - Win section, so I'm guessing that you can only have one Outro - Win no matter what. Even if you only have 1 debriefing.
Anyway, that's about the only thing I can think of. Is a global variable accessible from a camscript?
Can a global variable be set at the end of a mission?
If yes on both, then just set a global variable in a trigger at the end of a mission, and have the camscript divided into sections and check for the variable.

?(GlobalVariable=True): goto "Outro1"
?(GlobalVariable=False): goto "Outro2"

#Outro1
Outro1 camscript here...

#Outro2
Outro2 camscript here...

That sounds like it could work.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Variables from mission in outros?
« Reply #4 on: 20 Aug 2002, 18:44:41 »
I don't think its possible to use global vars in outros I tried to get what vehicle the player was in and use it in the outro but it never worked. I think they work totally different to missions.

Anmac

  • Guest
Re:Variables from mission in outros?
« Reply #5 on: 20 Aug 2002, 18:55:05 »

Bugger, poo, bum.

I have a funny outro but I want it to work on 5 of 6 endings WITH a custom debrief telling the player WHY they failed.

 :-\

I will have to leave it until tomorrow night... early start tomorrow.

 :'(

dismas

  • Guest
Re:Variables from mission in outros?
« Reply #6 on: 21 Aug 2002, 00:19:45 »
Another simple solution which you might use:

in init.sqs use globalvariables like missionOver = 0 and missionFailed = 0

Change the trigger that sets the end#1, whatever, to a none.  And have it exec your camera script depending on the trigger (win/lose)
then, when the outtro is finished, depending on win/lose do missionOver = 1 or missionFailed = 1
now make 2 triggers, each testing one of the variables, and have those triggers do end1, end2, or loose, or whatever.

I've done this for a multiplayer mission, and it really really works.

Anmac

  • Guest
Re:Variables from mission in outros?
« Reply #7 on: 21 Aug 2002, 05:59:12 »

Your talking about running an in mission cutscene right?

In the mission I'm making now, that would be more trouble than it's worth... maybe...

 :-\

dismas

  • Guest
Re:Variables from mission in outros?
« Reply #8 on: 21 Aug 2002, 06:13:36 »
yeah, it would basically be an in mission movie that would end the mission as soon as the movie finished.

Nagual

  • Guest
Re:Variables from mission in outros?
« Reply #9 on: 22 Aug 2002, 12:38:06 »
Variables dont seem to be accessable to intro / outro scripts in campaigns, and initIntro.sqs doesnt use them either  :(

As outros cant be veiwed again without playing the mission they are attached to, you could maybe have a two seperate cutscenes, and depending on the ending of the mission, move to the respective cutscene (and then it can be watched from campaign mission list again later on). It wouldnt really seem any different than a normal outro in the flow of the campaign.

Anmac

  • Guest
Re:Variables from mission in outros?
« Reply #10 on: 22 Aug 2002, 13:32:01 »
Basicly you have an outrolose, an outrowin and as many in mission outros as you like.

The one that would have been a real pain to make in mission is the outrowin so everything worked out ok...

*he said before testing the mission right through*

[update]

After testing... you now get the in mission lose PLUS the outrowin after the defrief.  Lucky it's an outro lose that doesn't seem out of place after you lose.  :P

[/update]
« Last Edit: 25 Aug 2002, 18:37:54 by Anmac »