OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: FlashPoint1985 on 30 Jun 2015, 19:38:54

Title: [arma 2] how end intro after my video ends?
Post by: FlashPoint1985 on 30 Jun 2015, 19:38:54
I set an intro in start of my SP mission, it doesn't include any camera, actually a video plays at start of mission intro using this code:

Code: [Select]
24 cutText ["", "BLACK OUT"];
_video = ["videoname.ogv"] spawn bis_fnc_playVideo;
waitUntil {scriptDone _video};
sleep 4;
24 cutText ["", "BLACK IN"];

but after video ends, player appears, which is a rabbit as I set! I want intro automatically skip after video ends, or skip in for example 30 seconds after mission intro start, then player lead to briefing screen and start main mission content from there.
thanks
Title: Re: [arma 2] how end intro after my video ends?
Post by: h- on 01 Jul 2015, 17:38:16
Not sure I completely follow but if you want the intro movie to play prior to briefing the mission has to have intro; as in a player and a end#1 trigger placed on the map in the 'Intro' section of the editor, and then add a file initIntro.sqf in which you add:
Code: [Select]
whateverglobalvariableiwanttousetoendtheintrowith = false;

24 cutText ["", "BLACK OUT"];
_video = ["videoname.ogv"] spawn bis_fnc_playVideo;
waitUntil {scriptDone _video};
sleep 4;
whateverglobalvariableiwanttousetoendtheintrowith = true;

And in that end#1 trigger's condition field whateverglobalvariableiwanttousetoendtheintrowith
:dunno:
Title: Re: [arma 2] how end intro after my video ends?
Post by: FlashPoint1985 on 02 Jul 2015, 20:36:39
Thanks man I will test that, although I did it by another way, but your answer is more accurate.