Sign in to follow this  
Followers 0
melbo

Any idea how this was done?

6 posts in this topic

Here a cutout from the mission flow FSM found in the campaign PBO. Thanks for giving me the idea to look for it, maybe I'll integrate it into one on my missions. ;)

0 fadeMusic 0;

[] spawn {
scriptName "missionFlow.fsm: all alone";

sleep 0.25;

BIS_leader switchMove "KIA_passenger_boat_holdleft";

if (alive BIS_inf) then {
	if (BIS_inf distance BIS_leader < 10) then {
		1 fadeMusic 0;
		0.5 fadeSound 0.2;
		playSound ["combat_deafness", true];

		[] spawn {
			scriptName "missionFlow.fsm: sound fade in";

			sleep 0.5;

			15 fadeSound 1;
		};

		[] spawn {
			scriptName "missionFlow.fsm: combat deafness";

			addCamShake [2, 5, 20];

			private ["_blur"];
			_blur = ppEffectCreate ["DynamicBlur", 474];
			_blur ppEffectEnable true;
			_blur ppEffectAdjust [0];
			_blur ppEffectCommit 0;

			waitUntil {ppEffectCommitted _blur};

			_blur ppEffectAdjust [10];
			_blur ppEffectCommit 0;

			titleCut ["", "WHITE IN", 5];

			_blur ppEffectAdjust [0];
			_blur ppEffectCommit 5;

			waitUntil {ppEffectCommitted _blur};

			_blur ppEffectEnable false;
			ppEffectDestroy _blur;
		};
	};

	// Unhide markers
	{_x setMarkerAlpha 1} forEach ["BIS_mines", "BIS_minesArea"];

	"BIS_mine" call BIS_fnc_missionConversations;

	0 fadeMusic 0.4;
	playMusic "EventTrack02a_F_EPA";

	"BIS_situation" call BIS_fnc_missionConversations;

	if (damage BIS_inf <= 0.25) then {
		"BIS_explodedFine" call BIS_fnc_missionConversations;
	} else {
		if ("FirstAidKit" in items BIS_inf) then {
			"BIS_explodedHasKit" call BIS_fnc_missionConversations;
		} else {
			"BIS_explodedNoKit" call BIS_fnc_missionConversations;
		};
	};

	sleep 1;

	saveGame;

	sleep 1;

	// Show map hint
	[["Navigation", "Map"]] call BIS_fnc_advHint;

	// Add Instructor Figure
	["AddTopic", ["i01_Navigation", "A_in2", localize "STR_A3_A_in2_Instructor_Navigation"]] call BIS_fnc_InstructorFigure;

	// Signal that the player is moving out
	BIS_movingOut = true;
};
};

Share this post


Link to post
Share on other sites

Nice find, I'm still lost on it though. Please post if you get it figured out!

Edit got it working. Made it activate in a trigger when it detects the unit is dead. Thanks again.

Edited by Melbo

Share this post


Link to post
Share on other sites

Hey, I'm having some troubles integrating it.

If I put it on a OnAct in a trigger an error pops up with no writing, If I put it in a sqf file and execute it nothing happens.

Any Help would be appreciated.

Share this post


Link to post
Share on other sites

The script above is being applied to units named BIS_leader and BIS_inf. The script would need to be adjusted to be applied universally. In its current state, units would need to be alive with those names.

What you are really looking for is the effects within this script.

1 fadeMusic 0;
0.5 fadeSound 0.2;
playSound ["combat_deafness", true];

and

[] spawn {
			// scriptName "missionFlow.fsm: combat deafness";

			addCamShake [2, 5, 20];

			private ["_blur"];
			_blur = ppEffectCreate ["DynamicBlur", 474];
			_blur ppEffectEnable true;
			_blur ppEffectAdjust [0];
			_blur ppEffectCommit 0;

			waitUntil {ppEffectCommitted _blur};

			_blur ppEffectAdjust [10];
			_blur ppEffectCommit 0;

			titleCut ["", "WHITE IN", 5];

			_blur ppEffectAdjust [0];
			_blur ppEffectCommit 5;

			waitUntil {ppEffectCommitted _blur};

			_blur ppEffectEnable false;
			ppEffectDestroy _blur;
		};

The rest of the script has to do with the dead leader, conversations, and the land mines.

Edited by Fight9

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0