OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 23 Jan 2006, 10:29:39
-
How do you prevent the outro-win cutscene from playing on any of the mission endings except for end 2?
-
i may be wrong here but i dont think it can be possible
End # 1, 2, 3 ,4 ,5 and 6 all play the win outro
End lose played the outro lose cutscene
Not 100% sure there but im pretty sure thats how it goes.
A work around might be possible
Save a varailbe like end2 = true
On the outro cutscene if outro2 is false deletevehicle every unit in the cutscne and end it.
If its true then just let the script play that should work.
-
If that worked and you didn't mind having the cutscenes in differennt areas you could place triggers and thislist eletevehicle for everything (im not writin in syntax, i just got up) and u could have the var check and a goto in the camera script.
-
456 is correct about what plays Win and what plays Loose.
However, the variable thing doesn't work. All variables are lost when the mission ends. It is possible to convey information from the mission to the Outro, and therefore it is theoretically possible to play a different Outro for different numbered endings. However, it is very difficult and frustrating.
I'll tell you how if you really want, but I earnestly and strongly recommend that you don't bother. Think your way around the problem. For example, have the Outros as cutscenes that play at the end of the mission. This is usually better anyway.
-
How did you carry the surviving squad from the mission to outro in Un-Impossible without vars Macca?
-
That's what I was trying to avoid telling you. ;D Partly because I can't quite remember, and partly because its vicious. The problem is that saveVar - the command you can use to transfer variables between missions in a campaign - does not work between mission and outro. (Curiously, it does work between intro and mission.) I used saveStatus, but it is not wholly reliable. Nor does it record whether a loon is alive or dead.
OK I'll look it up .... Just before the end of the mission a script (transfer.sqs) detects whether a unit is alive or dead. If it is dead it has all its magazines removed and an M16 mag, AK47mag and FNFal mag is added. At the very end of the mission exit.sqs saves the status of each loon.
At the start of the outro outroStart.sqs loads the status of each loon (in the outro they have the same names as in the mission) and then magazines are checked. If they have the loadout of death then the loon is deleted. The live loons are setDammage 0 since one of the peculiarities of all this is that sometimes a loon would start the outro dead for no reason at all.
Obviously you can use magazine loadouts to convey any information you want. There was some discussion of improving the system but I can't remember what the conclusion was. Using damage levels of gamelogics was mentioned. Anyway, the point is that its probably not worth it. It certainly wasn't worth discovering - don't forget that you can't test it in the mission editor, you have to do it from Single Missions.
You are welcome to use this system providing credit is given.
-
The live loons are setDammage 0 since one of the peculiarities of all this is that sometimes a loon would start the outro dead for no reason at all.
For what itÂ's worth I think I have solved this part of the puzzle...
Let's say you want to save the status of the player as "playerState". The recomended syntax would be:
player saveStatus "playerState"
Or so I thought when I started using saveStatus and saveVariable in campaigns. It turned out you need to delete the status before you save it, in order to start with a clean slate (even if the variable "playerState" has never been used before). Example:
deleteStatus "playerState"; player saveStatus "playerState"
Otherwise the unit will end up looking dead when the status are loaded with loadStatus. He is not really dead, though. He will be trapped in a death switchMove animation, but will be able to reply to radio calls with "negative" or "can't get there" shouted in an annoyingly loud voice.
Is it a bug? Is it a feature? No, its OFP.
-
I would set the other endings to lose, however I can't get anything to show up in the loose briefing. What is the lose line in briefing.html?
-
There is none, as nominesine says:
Is it a bug? Is it a feature? No, its OFP.
There is a way around it, and that is: Have a hidden objective with the text you want for the debrief. Then, when the loose ending is triggered, set that hidden objective to Active.
-Pilot