// The following datablock definition is an example of what you will need to create for each trigger you place.
// The name of this trigger datablock appears in the parenthesis below ("TestTriggerDatablock", in this case). 

datablock TriggerData(TestTriggerDatablock)
{
   // The period is value is used to control how often the console
   // onTriggerTick callback is called while there are any objects
   // in the trigger.  The default value is 100 MS.
   tickPeriodMS = 100;
};


// Next you will need to create this trigger datablock's onEnterTrigger function. You can just copy this function below 
// and change its name to reflect your new datablock name.

function TestTriggerDatablock::onEnterTrigger(%this,%trigger,%obj)
{
   // This script is called whenever an object enters the %trigger
   // The object entering the trigger (usually the player, but can also be AI players) is passed as %obj.  
   
   if ( isTriggerReady( %trigger, %obj )) // this ensures the VO is only heard the first time the trigger is entered
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Burke/brian_burke_line1.ogg");
   }
}


// If you want a trigger to have another behavior (like stopping a VO) when a player leaves it, you will need to create
// an "onLeaveTrigger" function like the one below. 

function TestTriggerDatablock::onLeaveTrigger(%this,%trigger,%obj)
{
   // This script is called whenever an object leaves the %trigger
   // area, the object is passed as %obj.  
   
   // you can use this to stop a particular VO if you want it to end when the player leaves the trigger
   $VMPlayer.Stop();
   
   // if you don't want this "stop-on-exit" behavior, you can either use the "//" marks to comment out the stop command
   // $VMPlayer.Stop();
   
   // ...or simply do not create the onLeaveTrigger function for this particular trigger -- it is not required
}


// So, in summary, you create and name a new datablock, then you create an onEnterTrigger script for that datablock.
// The onLeaveTrigger is optional.

// Now, to connect these scripts with the trigger you created in your level, find that trigger in the .mis file 
// (or you can find it using the mission editor if you prefer to work visually, but using a text-editor like Torsion on the
// .mis file will probably be faster if you named the triggers when you placed them). The trigger definition in the .mis file
// looks like this:

/*
   new Trigger(test_trigger) {
      canSaveDynamicFields = "1";
      position = "58.5009 -442.659 -0.1";
      rotation = "1 0 0 0";
      scale = "10 10 5";
      dataBlock = "defaultTrigger";
      polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
   };
*/

// Just change the "dataBlock =" part to reflect the name of the new trigger datablock you created above, ie:

//    datablock = "TestTriggerDatablock";

// and now your onEnterTrigger script will run when you move the player into that trigger. Presto!


datablock TriggerData(journalistIntroVOLevelThree_Datablock)
{
   
   tickPeriodMS = 100;
};

function journalistIntroVOLevelThree_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/CutSceneVO/madhuri_journ_lvl3_intro.ogg");
      %obj.schedule(87000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
   }

}

datablock TriggerData(RoofHelicopterLanding_Datablock)
{
   
   tickPeriodMS = 100;
};

function RoofHelicopterLanding_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Pilot3/brian_pilot3_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/pilot3_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(6000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 

}
}

datablock TriggerData(HowardHughesCCLobby_Datablock)
{
   
   tickPeriodMS = 100;
};

function HowardHughesCCLobby_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Receptionist2/pam_receptionist2_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/receptionist2_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(5000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
}
}

datablock TriggerData(JournalistReluctant_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistReluctant_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(ConferenceRoomSpeakerInMedias_Datablock)
{
   
   tickPeriodMS = 100;
};

function ConferenceRoomSpeakerInMedias_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/AdGuy/josh_adguy_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/adguy_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      IPhone_ShowPictureChance(%obj.iphone, 30000, $IPHONE_PICTURE_ONE, %obj, %trigger);   
      %obj.LockPlayerToDirection(%trigger.rotation);    
           
      %obj.schedule(30000, unlockPlayerToDirection);
}
}

datablock TriggerData(JournalistVisitsBuildingOne_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistVisitsBuildingOne_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line2.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line2.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(JournalistVisitsBuildingTwo_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistVisitsBuildingTwo_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Receptionist3/jarah_receptionist3_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/receptionist3_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(5000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 

}
}

datablock TriggerData(WalksThroughBathroomDoor_Datablock)
{
   
   tickPeriodMS = 100;
};

function WalksThroughBathroomDoor_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/PABI/rosalyn_PABI_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/pasystem_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(5000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 

}
}

datablock TriggerData(BuildingTwoBathroomStall_Datablock)
{
   
   tickPeriodMS = 100;
};

function BuildingTwoBathroomStall_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line3.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line3.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(JournalistEntersCorrectBldgNO_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistEntersCorrectBldgNO_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Receptionist4/laura_receptionist4_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/receptionist4_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
      %obj.schedule(7000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
      
   IPhone_AddPoints(IPhone, $IPHONE_KICKOUT_POINTS);

   %obj.schedule(7000, setTransform,KickOutLab.getTransform() );  

}
}

datablock TriggerData(JournalistEntersCorrectBldgYES_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistEntersCorrectBldgYES_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Receptionist4/laura_receptionist4_line2.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/receptionist4_lvl3_line2.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(5000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
}
}

datablock TriggerData(ResearchAssistShow1_Datablock)
{
   
   tickPeriodMS = 100;
};

function ResearchAssistShow1_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/ResearchAssist1/lynnae_researchasst1_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/researchasst_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(45000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
                  IPhone_FlashMicIcon(IPhone);
      schedule(45000, 0, IPhone_StopMicFlash, IPhone); 
      schedule(45000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);  
      Assistant.schedule(45000,followPath, Assistant_walk);
}
}


datablock TriggerData(Listening2TourGuide1_Datablock)
{
   
   tickPeriodMS = 100;
};

function Listening2TourGuide1_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line5.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line5.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(ResearchAssistShow2_Datablock)
{
   
   tickPeriodMS = 100;
};

function ResearchAssistShow2_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/ResearchAssist1/lynnae_researchasst1_line2.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/researchasst_lvl3_line2.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      AssistantShape.schedule(27000,pushForward);
      
      %obj.schedule(27000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
}
}

datablock TriggerData(Listening2TourGuide2_Datablock)
{
   
   tickPeriodMS = 100;
};

function Listening2TourGuide2_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line6.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line6.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(ResearchAssistShow3_Datablock)
{
   
   tickPeriodMS = 100;
};

function ResearchAssistShow3_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/ResearchAssist1/lynnae_researchasst1_line3.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/researchasst_lvl3_line3.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
 AssistantShape.schedule(32000,pushForward);
      %obj.schedule(32000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
}
}

datablock TriggerData(Listening2TourGuide3_Datablock)
{
   
   tickPeriodMS = 100;
};

function Listening2TourGuide3_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line7.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line7.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(ResearchAssistShow4_Datablock)
{
   
   tickPeriodMS = 100;
};

function ResearchAssistShow4_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/ResearchAssist1/lynnae_researchasst1_line4.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/researchasst_lvl3_line4.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 


 AssistantShape.schedule(32000,pushForward);
      %obj.schedule(32000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
}
}

datablock TriggerData(ResearchAssistShow5_Datablock)
{
   
   tickPeriodMS = 100;
};

function ResearchAssistShow5_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/ResearchAssist1/lynnae_researchasst1_line5.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/researchasst_lvl3_line5.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

 AssistantShape.schedule(47000,pushForward);
      %obj.schedule(47000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
      
      IPhone_ShowPictureChance(%obj.iphone, 29000, $IPHONE_PICTURE_TWO, %obj, %trigger);   
      %obj.LockPlayerToDirection(%trigger.rotation);          
      %obj.schedule(29000, unlockPlayerToDirection); 

}
}

datablock TriggerData(ResearchAssistShow6_Datablock)
{
   
   tickPeriodMS = 100;
};

function ResearchAssistShow6_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/ResearchAssist1/lynnae_researchasst1_line6.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/researchasst_lvl3_line6.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
 AssistantShape.schedule(18000,pushForward);
      %obj.schedule(18000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 

}
}

datablock TriggerData(Listening2TourGuide4and5_Datablock)
{
   
   tickPeriodMS = 100;
};

function Listening2TourGuide4and5_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line8.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line8.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(Listening2TourGuide6_Datablock)
{
   
   tickPeriodMS = 100;
};

function Listening2TourGuide6_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line9.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line9.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(AtComputerSeesOrganDeliveries_Datablock)
{
   
   tickPeriodMS = 100;
};

function AtComputerSeesOrganDeliveries_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line10.ogg");

//SCDPopupTextAlt2.setBitmap( "StitchCutDye/data/popupTextGraphics/questionMark_bw.png" );
SCDPopupTextAlt2.schedule( 7500, setVisible, true );
SCDPopupTextAlt2.schedule( 7500, setBitmap, "StitchCutDye/data/popupTextGraphics/excel_organList.png" ); 
SCDPopupTextAlt2.schedule( 15000, setVisible, false ); 

      IPhone_FlashClueIcon(IPhone);
      schedule(7500, 0, IPhone_StopClueFlash, IPhone); 
      schedule(7500, 0, IPhone_AddPoints, IPhone, $IPHONE_CLUE_POINTS);   

      %obj.schedule(15000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation);  
}
}

datablock TriggerData(LabAssistantScaresAway_Datablock)
{
   
   tickPeriodMS = 100;
};

function LabAssistantScaresAway_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/ResearchAssist2/daupo_researchasst2_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/researchasst2_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(5000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
      
   %obj.schedule(5000, setTransform,KickOutLab2.getTransform() );  
}
}

datablock TriggerData(JournalistEntersCleanRoom_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistEntersCleanRoom_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line11.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line11.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      IPhone_ShowPictureChance(%obj.iphone, 5000, $IPHONE_PICTURE_THREE, %obj, %trigger);   
      %obj.LockPlayerToDirection(%trigger.rotation);   
      %obj.schedule(5000, unlockPlayerToDirection); 
}
}

datablock TriggerData(FuchsTalking2LabAssistant_Datablock)
{
   
   tickPeriodMS = 100;
};

function FuchsTalking2LabAssistant_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/DrFuchs/samara_drfuchs_line3.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/drfuchs_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 

      %obj.schedule(40000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
      
            IPhone_FlashMicIcon(IPhone);
      schedule(40000, 0, IPhone_StopMicFlash, IPhone); 
      schedule(40000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);  
      
      Fuchs.schedule(40000,followPath, Fuchs_walk_1);

}
}

datablock TriggerData(BreakingNewsGuardDesk_Datablock)
{
   
   tickPeriodMS = 100;
};

function BreakingNewsGuardDesk_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/NY1Reporter/suyin_ny1reporter_line1.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/ny1reporter_lvl3_line1.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
            IPhone_FlashMicIcon(IPhone);
      schedule(15000, 0, IPhone_StopMicFlash, IPhone); 
      schedule(15000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);  
      %obj.schedule(15000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 

}
}

datablock TriggerData(JournalistOverhearsMess_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistOverhearsMess_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line12.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line12.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(FuchsPanicked_Datablock)
{
   
   tickPeriodMS = 100;
};

function FuchsPanicked_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Combined/cynthiaEdgarCallComb.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/drfuchs_lvl3_line2.png" );
SCDPopupText.setVisible( true );

SCDPopupText.schedule( 10000, setBitmap, "StitchCutDye/data/popupTextGraphics/edgar_lvl3_line1.png" ); 

SCDPopupText.schedule( 20000, setVisible, false ); 

            IPhone_FlashMicIcon(IPhone);
      schedule(20000, 0, IPhone_StopMicFlash, IPhone); 
      schedule(20000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);  

      FuchsShape.schedule(20000,pushForward);
      %obj.schedule(20000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 

}
}


datablock TriggerData(JournalistSeesLetterPrez_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistSeesLetterPrez_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line13.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line13.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}

datablock TriggerData(FuchsEdgarConversationBridge_Datablock)
{
   
   tickPeriodMS = 100;
};

function FuchsEdgarConversationBridge_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Combined/cynthiaEdgarEndComb.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/edgar_lvl3_line2.png" );
SCDPopupText.setVisible( true );

SCDPopupText.schedule( 13000, setBitmap, "StitchCutDye/data/popupTextGraphics/drfuchs_lvl3_line3.png" ); 
SCDPopupText.schedule( 30000, setBitmap, "StitchCutDye/data/popupTextGraphics/edgar_lvl3_line3.png" );

SCDPopupText.schedule( 39000, setVisible, false ); 

      %obj.schedule(39000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
      
      Edgar.schedule(40000,followPath, Edgar_walk);    
      
      IPhone_ShowPictureChance(%obj.iphone, 40000, $IPHONE_PICTURE_FOUR, %obj, %trigger);   
      %obj.LockPlayerToDirection(%trigger.rotation);         
      %obj.schedule(40000, unlockPlayerToDirection); 
      
      // Shot him
      Edgar.schedule(36000, mountImage, "HandGunImage", 0);
      Edgar.schedule(36000, playThread, 0,"fire");
      Fuchs.schedule(37000, playThread, 0,"death");
      
      
}
}

datablock TriggerData(JournalistFinalScene_Datablock)
{
   
   tickPeriodMS = 100;
};

function JournalistFinalScene_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line14.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line14.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 



}
}

datablock TriggerData(NotAllowedInWithoutID_Datablock)
{
   
   tickPeriodMS = 100;
};

function NotAllowedInWithoutID_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level3/Journalist/madhuri_journ_lvl3_line4.ogg");

SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_lvl3_line4.png" );
SCDPopupText.setVisible( true );
SCDPopupText.schedule( 5000, setVisible, false ); 
}
}



