OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pazuzu on 04 Sep 2005, 23:51:51
-
I have two end cutscenes in a mission. One is for end if a truck gets destroyed. The other is end for when all players are dead. They both work fine if these events happen seperately but if all the players are in truck when it gets destroyed then both triggers for end want to activate and I get part of one end scene and then the other cutting in. I've tried fooling around with the delays in triggers which helps sometimes but not always. I still get the conflicting scenes.
Any ideas?
Thanks.
-
You need three cutscene-starting triggers: one for the truck ending (which checks that the players are still alive), one for the players dead (which also checks that the truck has not been destroyed), and one for whatever you want to happen if both events have occurred.
Use variables to ensure that once one cutscene has started, the other is switched off.
Init.sqs
1off=false
2off=false
cutscene1 script
? 1off : exit
2off=true
Cutscene 2 script
? 2off : exit
1off=true
-
when you activate each cutscene, make a variable equal 1 (eg. truckdead=1). then have a check in the scripting for each to make sure that the other value doesnt equal 1 before it gets played.
you might need to set the value of each variable as 0 in the init.sqs too
hope that helps
-
Could you give me an example of what to put in triggers & what goes in the camera scipt?
I've tried using the variables but I still get the conflict sometimes...I must be doing it wrong.
Thanks.