## XIII
Class MultiViewTrigger

source: C:\XIII\XIII\Classes\MultiViewTrigger.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Triggers
             |
             +--XIII.XIIITriggers
                |
                +--XIII.MultiViewTrigger

Direct Known Subclasses:None

class MultiViewTrigger
extends XIII.XIIITriggers

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Variables
`Actor` | `CWndSfxTrigger`
`int` | `CamAppearSpeed[4]`
`color` | `CamBorderColor[4]`
`float` | `CamDuration[4]`
`float` | `CamFOV[4]`
`int` | `CamPosX[4]`
`int` | `CamPosY[4]`
`Actor` | `CamPosition[4]`
`int` | `CamRemoveSpeed[4]`
`Actor` | `CamSfxTrigger`
`int` | `CamSizeX[4]`
`int` | `CamSizeY[4]`
`float` | `CamStartDelay[4]`
`vector` | `CamTargetOffset[4]`
`Actor` | `CamTarget[4]`
`float` | `OnoDelay[4]`
`float` | `OnoDuration[4]`
`int` | `OnoPosX[4]`
`int` | `OnoPosY[4]`
`int` | `OnoSizeX[4]`
`int` | `OnoSizeY[4]`
`Texture` | `OnoTexture[4]`
`bool` | `bTriggerOnTouch`
`enum` | `eCamAppearFX`
`enum` | `eCamRemoveFX`
`color` | `mainBorderColor`
`mainViewportDestinationW,` | `mainViewportDestinationH`
`float` | `mainViewportDestinationTime`
`mainViewportDestinationX,` | `mainViewportDestinationY`
`float` | `mainViewportDurationTime`
`float` | `mainViewportLeadOutTime`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class MultiViewTrigger extends XIIITriggers;
    00005
    00006	var() int mainViewportDestinationX, mainViewportDestinationY;
    00007	var() int mainViewportDestinationW, mainViewportDestinationH;
    00008	var() float mainViewportDestinationTime;
    00009	var() float mainViewportDurationTime;
    00010	var() float mainViewportLeadOutTime;
    00011	var() color mainBorderColor;
    00012
    00013	var() actor CWndSfxTrigger;
    00014
    00015	var() bool bTriggerOnTouch;
    00016
    00017	var() actor CamPosition[4];
    00018	var() actor CamTarget[4];
    00019	var() vector CamTargetOffset[4];
    00020	var() actor CamSfxTrigger;
    00021	var() float CamFOV[4];
    00022	var() float CamDuration[4];
    00023	var() float CamStartDelay[4];
    00024	var() int CamPosX[4];
    00025	var() int CamPosY[4];
    00026	var() int CamSizeX[4];
    00027	var() int CamSizeY[4];
    00028	var() color CamBorderColor[4];
    00029	var() Texture OnoTexture[4];
    00030	var() int OnoPosX[4];
    00031	var() int OnoPosY[4];
    00032	var() int OnoSizeX[4];
    00033	var() int OnoSizeY[4];
    00034	var() float OnoDelay[4];
    00035	var() float OnoDuration[4];
    00036	var() enum eCamAppearFX
    00037	{
    00038		CAMFX_None,
    00039		CAMFX_Zoom,
    00040		CAMFX_ComeFromLeft,
    00041		CAMFX_ComeFromAbove,
    00042		CAMFX_ComeFromRight,
    00043		CAMFX_ComeFromUnder,
    00044		CAMFX_ComeFromTopLeft,
    00045		CAMFX_ComeFromTopRight,
    00046		CAMFX_ComeFromDownLeft,
    00047		CAMFX_ComeFromDownright,
    00048	} CamAppearFX[4];
    00049	var() enum eCamRemoveFX
    00050	{
    00051	  CAMOUTFX_None,
    00052	  CAMOUTFX_Zoom,
    00053		CAMOUTFX_GoToLeft,
    00054		CAMOUTFX_GoToAbove,
    00055		CAMOUTFX_GoToRight,
    00056		CAMOUTFX_GoToUnder,
    00057		CAMOUTFX_GoToTopLeft,
    00058		CAMOUTFX_GoToTopRight,
    00059		CAMOUTFX_GoToDownLeft,
    00060		CAMOUTFX_GoToDownright,
    00061	} CamRemoveFX[4];
    00062	var() int CamAppearSpeed[4];
    00063	var() int CamRemoveSpeed[4];
    00064
    00065	event Trigger( actor Other, pawn EventInstigator )
    00066	{
    00067	  local int q;
    00068	  local XIIIPlayerController XP;
    00069	  local MultiViewport MP;
    00070	  if (EventInstigator!=none && XIIIPlayerController(EventInstigator.controller)!=none)
    00071	  {
    00072	    XP = XIIIPlayerController(EventInstigator.controller);
    00073	    Log("MultiView Triggered");
    00074	    XP.multiviewport = Spawn(class'MultiViewport', XIIIPlayerController(EventInstigator.controller));
    00075	    MP = XP.multiviewport;
    00076	    MP.MyHudForFX = XIIIBaseHUD(XIIIPlayerController(EventInstigator.controller).MyHud);
    00077
    00078	    MP.mainViewportDestinationX = mainViewportDestinationX;
    00079	    MP.mainViewportDestinationY = mainViewportDestinationY;
    00080	    MP.mainViewportDestinationW = mainViewportDestinationW;
    00081	    MP.mainViewportDestinationH = mainViewportDestinationH;
    00082	    MP.mainViewportDestinationTime = mainViewportDestinationTime;
    00083
    00084	    MP.CWndSfxTrigger = CWndSfxTrigger;
    00085	    MP.fStartTime = Level.TimeSeconds;
    00086	    MP.mainViewportDurationTime = mainViewportDurationTime;
    00087	    MP.mainViewportLeadOutTime = mainViewportLeadOutTime;
    00088	    MP.mainBorderColor = mainBorderColor;
    00089
    00090	    MP.CamSfxTrigger = CamSfxTrigger;
    00091	    for (q=0; q<4; q++)
    00092	    {
    00093	      MP.CamPosition[q] = CamPosition[q];
    00094	      MP.CamTarget[q] = CamTarget[q];
    00095	      MP.CamFOV[q] = CamFOV[q];
    00096	      MP.CamDuration[q] = CamDuration[q];
    00097	      MP.CamPosX[q] = CamPosX[q];
    00098	      MP.CamPosY[q] = CamPosY[q];
    00099	      MP.CamSizeX[q] = CamSizeX[q];
    00100	      MP.CamSizeY[q] = CamSizeY[q];
    00101	      MP.CamBorderColor[q] = CamBorderColor[q];
    00102	      MP.OnoTexture[q] = OnoTexture[q];
    00103	      MP.OnoPosX[q] = OnoPosX[q];
    00104	      MP.OnoPosY[q] = OnoPosY[q];
    00105	      MP.OnoSizeX[q] = OnoSizeX[q];
    00106	      MP.OnoSizeY[q] = OnoSizeY[q];
    00107	      MP.OnoDelay[q] = OnoDelay[q];
    00108	      MP.OnoDuration[q] = OnoDuration[q];
    00109	      MP.CamAppearFX[q] = CamAppearFX[q];
    00110	      MP.CamRemoveFX[q] = CamRemoveFX[q];
    00111	      MP.CamStartDelay[q] = CamStartDelay[q];
    00112	      MP.camAppearSpeed[q] = camAppearSpeed[q];
    00113	      MP.camRemoveSpeed[q] = camRemoveSpeed[q];
    00114	      MP.CamTargetOffset[q] = CamTargetOffset[q];
    00115	    }
    00116
    00117	    if (CWndSfxTrigger != none && CWndSfxTrigger(CWndSfxTrigger) != none)
    00118	    {
    00119	      Log("CWndSfxTrigger triggered!");
    00120	      CWndSfxTrigger(CWndSfxTrigger).Trigger(self, EventInstigator);
    00121	    }
    00122	    Destroy();
    00123	  }
    00124	}
    00125
    00126	event Touch(Actor other)
    00127	{
    00128	  if (bTriggerOnTouch)
    00129	    Trigger(other, Pawn(other));
    00130	}
    00131
    00132
    00133
    00134	defaultproperties
    00135	{
    00136	     mainViewportDestinationX=200
    00137	     mainViewportDestinationY=200
    00138	     mainViewportDestinationW=200
    00139	     mainViewportDestinationH=200
    00140	     mainViewportDestinationTime=5.000000
    00141	     mainViewportDurationTime=5.000000
    00142	     mainViewportLeadOutTime=5.000000
    00143	     mainBorderColor=(B=255,G=255,R=255,A=255)
    00144	     CamFOV(0)=45.000000
    00145	     CamFOV(1)=45.000000
    00146	     CamFOV(2)=45.000000
    00147	     CamFOV(3)=45.000000
    00148	     CamDuration(0)=4.000000
    00149	     CamDuration(1)=4.000000
    00150	     CamDuration(2)=4.000000
    00151	     CamDuration(3)=4.000000
    00152	     CamStartDelay(0)=0.500000
    00153	     CamStartDelay(1)=0.500000
    00154	     CamStartDelay(2)=0.500000
    00155	     CamStartDelay(3)=0.500000
    00156	     CamPosX(0)=100
    00157	     CamPosX(1)=100
    00158	     CamPosX(2)=250
    00159	     CamPosX(3)=250
    00160	     CamPosY(0)=100
    00161	     CamPosY(1)=250
    00162	     CamPosY(2)=250
    00163	     CamPosY(3)=100
    00164	     CamSizeX(0)=100
    00165	     CamSizeX(1)=100
    00166	     CamSizeX(2)=100
    00167	     CamSizeX(3)=100
    00168	     CamSizeY(0)=100
    00169	     CamSizeY(1)=100
    00170	     CamSizeY(2)=100
    00171	     CamSizeY(3)=100
    00172	     CamBorderColor(0)=(B=255,G=255,R=255,A=255)
    00173	     CamBorderColor(1)=(B=255,G=255,R=255,A=255)
    00174	     CamBorderColor(2)=(B=255,G=255,R=255,A=255)
    00175	     CamBorderColor(3)=(B=255,G=255,R=255,A=255)
    00176	     OnoDuration(0)=10.000000
    00177	     OnoDuration(1)=10.000000
    00178	     OnoDuration(2)=10.000000
    00179	     OnoDuration(3)=10.000000
    00180	     CamAppearSpeed(0)=5
    00181	     CamAppearSpeed(1)=5
    00182	     CamAppearSpeed(2)=5
    00183	     CamAppearSpeed(3)=5
    00184	     CamRemoveSpeed(0)=20
    00185	     CamRemoveSpeed(1)=20
    00186	     CamRemoveSpeed(2)=20
    00187	     CamRemoveSpeed(3)=20
    00188	}

End Source Code