OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: B-2-0 on 26 May 2004, 23:15:00

Title: ForceEnd via a script
Post by: B-2-0 on 26 May 2004, 23:15:00
Hi folks...

Is it possible to forcend the mission from a script instead of a trigger?

I tried putting it at the end of my outro.sqs and it doesn't work.

Thx
Title: Re:ForceEnd via a script
Post by: h- on 26 May 2004, 23:37:52
???

If you are in the intro/outro 'section' of the editor, the forceEnd might not work...

Or there's something hairy in your script that prevents the forceEnd to be read...

???
Title: Re:ForceEnd via a script
Post by: B-2-0 on 27 May 2004, 00:00:21
Thx for the reply HateR_Kint

I am running the command from a scripted outro yes, not the in-editor function.

The script works fine but the mission doesn't end even though i have forceend at the end of it.
Title: Re:ForceEnd via a script
Post by: macguba on 27 May 2004, 09:49:38
Forceend is a "cheat":   you use it to end the mission when everything has gone pear shaped.     This doesn't really apply in an Intro/Outro and I wouldn't be surprised if forcend doesn't work there.      Do a test and try it in a trigger.    

The solution of course is to have an ending trigger in the in outro which is fired by a variable which is set to true in the script.
Title: Re:ForceEnd via a script
Post by: tHe s4lut3 on 27 May 2004, 17:40:00
this is the perfect thread for my question, too, thx.

which end do i select if i want an intro to straightly into a mission, or to the briefing before the mission?
Title: Re:ForceEnd via a script
Post by: h- on 27 May 2004, 19:42:20
Intro done in the intro 'section' of the mission editor always plays before the briefing, so the ends have nothing to do with that (afaik)...

I think you need to use the end#1 to end the intro/outro, or a cutscene in general... (again, afaik...)
Title: Re:ForceEnd via a script
Post by: tHe s4lut3 on 27 May 2004, 22:13:43
ok i'll try that but what about "terminating" a cutscene cos i'm not sure if the "ends#" end the mission.....
Title: Re:ForceEnd via a script
Post by: h- on 27 May 2004, 22:29:12
Damned!!
Did a bit of misspelling/informing there as you don't need to end a cutscene in general by having an endtrigger  :-[

Just the intro/outro made in their respective 'sections' of the editor...

Sorry...  :P
Title: Re:ForceEnd via a script
Post by: macguba on 28 May 2004, 00:47:33
OK here's the whole deal.

The order is

Intro
Briefing
Opening cutscene if you want one
Mission
Ending cutscene if you want one
Debrief screen
Outro

You end the Intro just like you end a Mission, with a trigger type end.    Similarly the Outro.     You can use End#1 (for example) in both the Intro and the Mission, they do not interfere with each other.

Ending cutscenes is totally different and you should read snYpir's tutorial on the topic.    (Also read messiah's camera.sqs tutorial).  You can of course end a Mission from within a cutscene, but setting a variable to true which in turn fires the end trigger.