kahna 13 Posted July 19, 2013 (edited) I'm working on a downed pilot (choppers sabotaged, find that out later) + search and rescue mission. I want the pilots and passengers to have a cinematic into (of sorts) where their input is disabled, they're blacking in and out (injuries, g-forces etc) and sounds are playing (music atm, until I find a good damage alarm .ogg file). I've got the intro sorted, but the SAR team also experiences the blackouts, disable and sounds. Init of Pilots/Passengers: nul = [this] execVM "crashing.sqf"; crashing.sqf: player moveInDriver Heli; // Heli is a pre-positioned UH-80 at 650m ATL that takes critical damage from modules via triggers 2 seconds after loading in. disableUserInput true; // Allows cinematic, first person will be forced by difficulty. sleep 4; playMusic "Track11_StageB_stealth"; titleText ["", "BLACK OUT"]; // G-Forces + Injuries from the sabotage damage. sleep 3; titleText ["", "BLACK IN"]; sleep 3; deleteVehicle Escort; // Deletes the AH-99 flying escort duty in front of the UH-80 after it spectacularly bursts into flames from it's own sabotage damage and falls out of view. titleText ["", "BLACK OUT"]; sleep 3; titleText ["", "BLACK IN"]; sleep 3; titleText ["", "BLACK OUT"]; sleep 2; titleText ["", "BLACK IN"]; sleep 2; titleText ["", "BLACK OUT"]; sleep 2; player action ["eject", Heli]; player moveInDriver Angel; // Angel is a pre-positioned critically damaged/no fuel/no ammo UH-80 on the ground where the player starts the mission. Objects hidden in the ground employ light points that are used to simulate emergency lighting. deleteVehicle Heli; // Deletes the doomed UH-80 before it crashes, don't want the flaming wreck of ANOTHER UH-80 at night somewhere else... That would just be silly. SkipTime 2; // Pilots/Passengers knocked unconscious, they wake up two hours after impact and night has fallen. 0 setFog 0.3; 0 setOvercast 1.0; sleep 5; systemChat "Two Hours Later..."; sleep 5; titleText ["", "BLACK IN"]; sleep 3; titleText ["", "BLACK OUT"]; sleep 3; playMusic ""; // Stops the music from playing. titleText ["", "BLACK IN"]; sleep 2; titleText ["", "BLACK OUT"]; sleep 2; titleText ["", "BLACK IN"]; disableUserInput false; // Returns control to the player. Mission starts. Task assigned - Survive, Evade, Resist, Escape. Edited July 19, 2013 by Kahna Share this post Link to post Share on other sites
Ghost 40 Posted July 19, 2013 Just remember the init of objects placed in editor are global. You would need to run those effects on a local to player scripts from the init.sqf and check to see if player == the unit you want to have the effects on. Share this post Link to post Share on other sites
kahna 13 Posted July 19, 2013 Did not know that, thanks! Made a simple check script to solve this problem. Works like a charm. _Allow = ["B_Helipilot_F"]; if ((typeof player) in _Allow) then {[] execVM "crashing.sqf"} else {}; Share this post Link to post Share on other sites
Ghost 40 Posted July 19, 2013 you do not need to make it a if then else, unless you have code going into the else block Share this post Link to post Share on other sites
cuel 25 Posted July 19, 2013 In crashing.sqf you can check locality. _unit = _this select 0; if (not (local _unit)) exitWith {} Share this post Link to post Share on other sites