// 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(BaseEntranceOutside1_Datablock)
{
   
   tickPeriodMS = 100;
};

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Burke/brian_burke_line1.ogg");

      SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/burke_line1.png" );
      SCDPopupText.setVisible( true );
      SCDPopupText.schedule( 5000, setVisible, false ); 
      
      %obj.schedule(39000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
      
      Burke.schedule(39000,followPath, burke_walk_1);
     // schedule(5000, 0, IPhone_FlashJournalIcon, IPhone);
   }
}


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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      //$VMPlayer.PlaySong("~/data/sound/Level1/Burke/brian_burke_line1.ogg");

   //SCD_IphoneFrame.setBitmap( "StitchCutDye/client/ui/SCD/iphone_clearwindow.png" );
   SCD_IphoneFrame.setVisible( true );
   picture_taken_one.schedule( 10, setVisible, true );
   picture_taken_one.schedule( 2000, setVisible, false );
   picture_taken_two.schedule( 2001, setVisible, true );
   picture_taken_two.schedule( 4000, setVisible, false );
   picture_taken_three.schedule( 4001, setVisible, true );
   picture_taken_three.schedule( 6000, setVisible, false );
   picture_taken_four.schedule( 6001, setVisible, true );
   picture_taken_four.schedule( 8000, setVisible, false );
   SCD_IphoneFrame.schedule( 8001, setVisible, false );
   Canvas.schedule(8002,pushDialog,SCD_ScreenShot);
   }
}



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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Burke/brian_burke_line2.ogg");

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

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

      BurkeShape.schedule(5000,pushForward);
      Hare.schedule(5000,followPath, hare_walk_1);
      
      schedule(5000, 0, IPhone_FlashJournalIcon, IPhone);   
   
   }
}


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

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

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

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

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

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

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

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

   SCDPopupText.schedule( 7000, setBitmap, "StitchCutDye/data/popupTextGraphics/sanganno_line1.png" ); 

   SCDPopupText.schedule( 14000, setVisible, false ); 
   
   IPhone_FlashMicIcon(IPhone);
   schedule(14000, 0, IPhone_StopMicFlash, IPhone); 
   schedule(14000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);
      
   %obj.schedule(14000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);    
   
   }
}

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Manota/lynnae_manota_line2.ogg");

   SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/manota_line2.png" );
   SCDPopupText.setVisible( true );
   SCDPopupText.schedule( 6000, setVisible, false ); 
   
   %obj.schedule(5000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);    
   
   Manato.schedule(8200,followPath, manota_walk);
   Sanganno.schedule(8200,followPath, sanganno_walk);
   
   
   }
}

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

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

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

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

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

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

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

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

   SCDPopupText.schedule( 12000, setBitmap, "StitchCutDye/data/popupTextGraphics/burke_line4.png" ); 
   SCDPopupText.schedule( 14000, setBitmap, "StitchCutDye/data/popupTextGraphics/hare_line1.png" );
   SCDPopupText.schedule( 16000, setBitmap, "StitchCutDye/data/popupTextGraphics/burke_line5.png" );
   SCDPopupText.schedule( 24000, setBitmap, "StitchCutDye/data/popupTextGraphics/hare_line2.png" );

   SCDPopupText.schedule( 28000, setVisible, false ); 
   
      IPhone_FlashMicIcon(IPhone);
      schedule(28000, 0, IPhone_StopMicFlash, IPhone); 
      schedule(28000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);
   
      %obj.schedule(28000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation);    
   
   }
}

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

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

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

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

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Prisoner1/itay_prisoner1_line1.ogg");

   SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/prisoner_line1.png" );
   SCDPopupText.setVisible( true );
   SCDPopupText.schedule( 8000, setVisible, false ); 
    
      // Initialize a picture opporunity
      IPhone_ShowPictureChance(%obj.iphone, 8000, $IPHONE_PICTURE_TWO, %obj, %trigger);   
      %obj.LockPlayerToDirection(%trigger.rotation);   
      %obj.schedule(8000, unlockPlayerToDirection);
   }
}

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/JOurnalist/madhuri_journ_lvl1_line3.ogg");

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

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Soldier1/david_soldier1_line1.ogg");

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

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Soldier1/david_soldier1_line2.ogg");

   SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/soldier1_line2.png" );
   SCDPopupText.setVisible( true );
   SCDPopupText.schedule( 5000, setVisible, false ); 
   
   %obj.schedule(5000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);  
   
   %obj.schedule(5000, setTransform,FrontDoorKick.getTransform() );  

   IPhone_AddPoints(IPhone, $IPHONE_KICKOUT_POINTS);
   }
} 

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/Level1/Soldier1/david_soldier1_line3.ogg");

   SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/soldier1_line3.png" );
   SCDPopupText.setVisible( true );
   SCDPopupText.schedule( 5000, setVisible, false ); 
   
   %obj.schedule(5000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);    
   %obj.schedule(5000, setTransform,RearDoorKick.getTransform() );  

      IPhone_AddPoints(IPhone, $IPHONE_KICKOUT_POINTS);
   }
}

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

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

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

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

   SCDPopupText.schedule( 5000, setBitmap, "StitchCutDye/data/popupTextGraphics/tcn_line1.png" ); 

   SCDPopupText.schedule( 10000, setVisible, false );  

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

   
   }
}

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

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

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

//SCDPopupTextAlt.setBitmap( "StitchCutDye/data/popupTextGraphics/questionMark_bw.png" );
   SCDPopupTextAlt.schedule(5000, setVisible, true );
   SCDPopupTextAlt.schedule( 5000, setBitmap, "StitchCutDye/data/popupTextGraphics/map_crumbled.jpg" );
   SCDPopupTextAlt.schedule( 12000, setVisible, false ); 
   
   IPhone_FlashClueIcon(IPhone);
   schedule(5000, 0, IPhone_StopClueFlash, IPhone); 
   schedule(5000, 0, IPhone_AddPoints, IPhone, $IPHONE_CLUE_POINTS);     
   
   %obj.schedule(12000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation); 
   
   }
}

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

function JournCommunicationsRoom_Datablock::onEnterTrigger(%this,%trigger,%obj)
{
   if ( isTriggerReady( %trigger, %obj )) 
   {
   
      // Start sound for this comm
      $VMPlayer.PlaySong("~/data/sound/Level1/Journalist/madhuri_journ_lvl1_line4.ogg");
      SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_line5.png" );
      SCDPopupText.setVisible( true );
      SCDPopupText.schedule( 5000, setVisible, false ); 
          
      // Initialize a picture opporunity
      IPhone_ShowPictureChance(%obj.iphone, 13000, $IPHONE_PICTURE_ONE, %obj, %trigger);   
      %obj.schedule(13000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation);   
      
   }
}

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

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

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

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

   SCDPopupText.schedule( 13000, setBitmap, "StitchCutDye/data/popupTextGraphics/pilot2_line1.png" ); 
   SCDPopupText.schedule( 18000, setBitmap, "StitchCutDye/data/popupTextGraphics/pilot1_line2.png" );

   %obj.schedule(28000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);  
   
      IPhone_FlashMicIcon(IPhone);
      schedule(28000, 0, IPhone_StopMicFlash, IPhone); 
      schedule(28000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);   
     

   SCDPopupText.schedule( 28000, setVisible, false ); 
   }
}

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

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

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

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

   SCDPopupText.schedule( 7000, setBitmap, "StitchCutDye/data/popupTextGraphics/burke_line7.png" ); 
   SCDPopupText.schedule( 12000, setBitmap, "StitchCutDye/data/popupTextGraphics/sanganno_line2.png" );
   SCDPopupText.schedule( 17000, setBitmap, "StitchCutDye/data/popupTextGraphics/burke_line6.png" );
   SCDPopupText.schedule( 27000, setBitmap, "StitchCutDye/data/popupTextGraphics/hare_line3.png" );
   SCDPopupText.schedule( 35000, setVisible, false );

         // Initialize a picture opporunity
   IPhone_ShowPictureChance(%obj.iphone, 35000, $IPHONE_PICTURE_THREE, %obj, %trigger);   
   %obj.schedule(30000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);   
   
      Burke2.schedule(27000,followPath, burke_walk_2);
      Burke2Shape.schedule(42000,pushForward);
   
   }
}

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

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

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

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

   SCDPopupText.schedule( 18000, setBitmap, "StitchCutDye/data/popupTextGraphics/undoctor2_line1.png" ); 

   SCDPopupText.schedule( 36000, setVisible, false ); 
      IPhone_FlashMicIcon(IPhone);
      schedule(36000, 0, IPhone_StopMicFlash, IPhone); 
      schedule(36000, 0, IPhone_AddPoints, IPhone, $IPHONE_MIC_POINTS);   
   %obj.schedule(36000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);    
   
   }
}

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

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

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

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

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

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

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

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

   SCDPopupText.schedule( 5000, setVisible, false ); 
   }
}

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

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

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

   //SCDPopupTextAlt2.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_line10.png" );
SCDPopupTextAlt2.schedule(5000, setVisible, true );   
//SCDPopupTextAlt2.setVisible( true );
   SCDPopupTextAlt2.schedule( 5000, setBitmap, "StitchCutDye/data/popupTextGraphics/dhl.png" );
   SCDPopupTextAlt2.schedule( 12000, setVisible, false );

IPhone_FlashClueIcon(IPhone);
   schedule(5000, 0, IPhone_StopClueFlash, IPhone); 
   schedule(5000, 0, IPhone_AddPoints, IPhone, $IPHONE_CLUE_POINTS);     
   
   %obj.schedule(12000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation); 
 
   }
}

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

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

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

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

   %obj.schedule(28000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);       
   
   IPhone_FlashClueIcon(IPhone);
   schedule(7500, 0, IPhone_StopClueFlash, IPhone); 
   schedule(7500, 0, IPhone_AddPoints, IPhone, $IPHONE_CLUE_POINTS);        
   
   SCDPopupTextAlt2.schedule( 28000, setVisible, false );
   }
}

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

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

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

   SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/journalist_line13.png" );
   SCDPopupText.setVisible( true );
   SCDPopupText.schedule( 3000, setVisible, false );
   /*
   SCD_IphoneFrame.setVisible( true );
   picture_taken_one.schedule( 1500, setVisible, true );
   picture_taken_one.schedule( 3000, setVisible, false );
   SCD_IphoneFrame.schedule( 3000, setVisible, false );
   SCDPopupText.schedule( 3000, setVisible, false );
   Canvas.schedule(3001,pushDialog,SCD_ScreenShot); 
   */
         // Initialize a picture opporunity
   IPhone_ShowPictureChance(%obj.iphone, 13000, $IPHONE_PICTURE_FOUR, %obj, %trigger);   
   %obj.schedule(13000, unlockPlayerToDirection);
   %obj.LockPlayerToDirection(%trigger.rotation);   
   
   }
}

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/CutSceneVO/madhuri_journ_lvl1_intro.ogg");
      %obj.schedule(60000, unlockPlayerToDirection);
      %obj.LockPlayerToDirection(%trigger.rotation); 
      
      // add guns to hands here
      Burke.mountImage( "HandGunImage2", 0);
      Burke2.mountImage( "HandGunImage2", 0);
      Hare.mountImage( "HandGunImage2", 0);
   }
}

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/SFX/shootingwallshots.ogg");       
   }
}

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

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

if ( isTriggerReady( %trigger, %obj )) 
   {
      $VMPlayer.PlaySong("~/data/sound/SFX/cryingman.ogg");       
   }
}