## XIDMaps
Class Banque01MallettePick

source: C:\XIII\XIDMaps\Classes\Banque01MallettePick.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Pickup
             |
             +--XIII.XIIIPickup
                |
                +--XIII.EventItemPick
                   |
                   +--XIDMaps.Banque01MallettePick

Direct Known Subclasses:None

class Banque01MallettePick
extends XIII.EventItemPick

    //___________________________________________________________
    //
    //___________________________________________________________

Variables
`XIIIDocumentPick` | `SixSenseSkillDoc`
`XIIIDocumentPick` | `StunningSkillDoc`

States
Pickup

State Pickup Function Summary
`bool` | `ValidTouch(Actor Other)`

Source Code

    00001	//___________________________________________________________
    00002	//
    00003	//___________________________________________________________
    00004	class Banque01MallettePick extends EventItemPick;
    00005
    00006	var() XIIIDocumentPick StunningSkillDoc;
    00007	var() XIIIDocumentPick SixSenseSkillDoc;
    00008
    00009
    00010	//___________________________________________________________
    00011	//auto state Pickup
    00012	Auto State Pickup
    00013	{
    00014
    00015		event BeginState()
    00016		{
    00017			//bNoInteractionIcon = true;
    00018			bInteractive = false;
    00019			Disable('Touch');
    00020		}
    00021
    00022		event Trigger( actor Other, pawn EventInstigator )
    00023		{
    00024			bInteractive = true;
    00025			//bNoInteractionIcon = false;
    00026			Disable( 'Trigger' );
    00027			Enable( 'Touch' );
    00028		}
    00029
    00030		function bool ValidTouch( actor Other )
    00031		{
    00032
    00033			local Inventory Copy;
    00034
    00035			// make sure its a live player
    00036			if ( (Pawn(Other)==none) || !Pawn(Other).bCanPickupInventory || (Pawn(Other).Health <= 0) )
    00037				return false;
    00038			// make sure not touching through wall
    00039			if ( !FastTrace(Other.Location+Pawn(Other).EyeHeight*vect(0,0,1), Location) )
    00040				return false;
    00041			// make sure game will let player pick me up
    00042			if( Level.Game.PickupQuery(Pawn(Other), self) )
    00043			{
    00044				if ( bCauseEventOnPick )
    00045				{
    00046					TriggerEvent(Event, self, Pawn(Other));
    00047
    00048					// when he gets the case, player gets also skill documents
    00049					Copy = SixSenseSkillDoc.SpawnCopy(Pawn(Other));
    00050					SixSenseSkillDoc.AnnouncePickup(Pawn(Other));
    00051					Copy.PickupFunction(Pawn(Other));
    00052
    00053					Copy = StunningSkillDoc.SpawnCopy(Pawn(Other));
    00054					StunningSkillDoc.AnnouncePickup(Pawn(Other));
    00055					Copy.PickupFunction(Pawn(Other));
    00056
    00057				}
    00058				return true;
    00059			}
    00060			return false;
    00061		}
    00062	}
    00063
    00064
    00065	//___________________________________________________________
    00066
    00067
    00068	defaultproperties
    00069	{
    00070	     InvSelectItemSound=Sound'XIIIsound.Items.PassSel1'
    00071	     InvActivateSound=Sound'XIIIsound.Items.PassFire1'
    00072	     InvItemName="Case"
    00073	     bCauseEventOnPick=True
    00074	     InventoryType=None
    00075	     PickupMessage="Case"
    00076	     PickupSound=Sound'XIIIsound.Items.PassPick1'
    00077	     StaticMesh=StaticMesh'MeshObjetsPickup.valise'
    00078	}

End Source Code