## XIDCine
Class TriggerPetitCachottier

source: C:\XIII\XIDCine\Classes\TriggerPetitCachottier.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Triggers
             |
             +--XIDCine.TriggerPetitCachottier

Direct Known Subclasses:None

class TriggerPetitCachottier
extends Engine.Triggers

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

Variables
`Array` | `PersosACacher`
`bool` | `bHideAtMapStart`

Function Summary
`void` | `ShowAndHide()`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class TriggerPetitCachottier extends Triggers;
    00005
    00006	VAR()	Array<Actor> PersosACacher;
    00007	VAR()	bool bHideAtMapStart;
    00008	VAR		bool bFirstCall;
    00009
    00010	struct tpcMemo
    00011	{
    00012		VAR bool ColActors, BlockActors, BlockPlayers;
    00013	};
    00014
    00015	VAR		Array<tpcMemo> MecaFlags;
    00016
    00017	FUNCTION ShowAndHide()
    00018	{
    00019		LOCAL int i;
    00020
    00021		for (i=0;i<PersosACacher.Length;i++)
    00022		{
    00023			if (PersosACacher[i]!=none)
    00024			{
    00025				PersosACacher[i].bHidden=!PersosACacher[i].bHidden;
    00026				if ( PersosACacher[i].bHidden )
    00027					PersosACacher[i].SetCollision(false,false,false);
    00028				else
    00029					PersosACacher[i].SetCollision(MecaFlags[i].ColActors ,MecaFlags[i].BlockActors, MecaFlags[i].BlockPlayers );
    00030
    00031				PersosACacher[i].RefreshDisplaying();
    00032			}
    00033		}
    00034	}
    00035
    00036	EVENT PostBeginPlay( )
    00037	{
    00038		LOCAL int i;
    00039
    00040		MecaFlags.Insert( 0, PersosACacher.Length );
    00041
    00042		for ( i = 0; i < PersosACacher.Length; ++i )
    00043		{
    00044			if ( PersosACacher[i]!=none )
    00045			{
    00046				MecaFlags[i].ColActors = PersosACacher[i].bCollideActors;
    00047				MecaFlags[i].BlockActors = PersosACacher[i].bBlockActors;
    00048				MecaFlags[i].BlockPlayers = PersosACacher[i].bBlockPlayers;
    00049			}
    00050			else
    00051				Log(self@"~"@i@"~"@PersosACacher[i]);
    00052		}
    00053
    00054		if ( bHideAtMapStart )
    00055			ShowAndHide();
    00056	}
    00057
    00058	EVENT Trigger(actor Other, pawn EventInstigator)
    00059	{
    00060		ShowAndHide();
    00061	}
    00062
    00063
    00064
    00065	defaultproperties
    00066	{
    00067	     bHideAtMapStart=True
    00068	}

End Source Code