## XIII
Class EventItemPick

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

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

Direct Known Subclasses:Banque01BombePick, Banque01MallettePick, Hual02MagneticCardPick, Hual04aFusiblePick, PRock03MagneticCardPick, PRock03MicroHFPick, Sanc02aMagneticCardPick, Sanc02aStatuePartPick, Spads02BombePick, Spads02MicroPick, Usa01BombePick

class EventItemPick
extends XIII.XIIIPickup

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

Variables
`mesh` | `FpsMeshToUse`
`sound` | `InvActivateSound`
`sound` | `InvSelectItemSound`

Function Summary
`Inventory` | `SpawnCopy(Pawn Other)`
    //_____________________________________________________________________________
    // Either give this inventory to player Other, or spawn a copy
    // and give it to the player Other, setting up original to be respawned.
    //

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class EventItemPick extends XIIIPickup;
    00005
    00006	var() mesh FpsMeshToUse;
    00007	//var() texture IconToUse;
    00008	var() sound InvSelectItemSound;
    00009	var() sound InvActivateSound;
    00010
    00011	//_____________________________________________________________________________
    00012	// Either give this inventory to player Other, or spawn a copy
    00013	// and give it to the player Other, setting up original to be respawned.
    00014	//
    00015	function inventory SpawnCopy( pawn Other )
    00016	{
    00017	    local inventory Copy;
    00018
    00019	    if ( Inventory != None )
    00020	    {
    00021	      Copy = Inventory;
    00022	      Inventory = None;
    00023	    }
    00024	    else
    00025	      Copy = spawn(InventoryType,Other,,,rot(0,0,0));
    00026
    00027	    Copy.GiveTo( Other );
    00028	    // ELR for this class modify the copy mesh
    00029	    Copy.Mesh = FpsMeshToUse;
    00030	    Copy.event = event;
    00031	    if ( ((XIIIItems(Copy) == none) || (XIIIItems(Copy).sItemName == "")) && (InvItemName != "")  )
    00032	      Copy.ItemName = InvItemName;
    00033	//    Copy.Icon = IconToUse;
    00034	    PowerUps(Copy).ActivateSound = InvActivateSound;
    00035	    XIIIItems(Copy).hSelectItemSound = InvSelectItemSound;
    00036
    00037	    if( Level.Game.ShouldRespawn(self) )
    00038	      StartSleeping();
    00039	    else
    00040	      Destroy();
    00041	    return Copy;
    00042	}
    00043
    00044	//    Mesh=VertMesh'XIIIDeco.ClefM'
    00045
    00046
    00047	defaultproperties
    00048	{
    00049	     FpsMeshToUse=SkeletalMesh'XIIIArmes.fpsM'
    00050	     InventoryType=Class'XIII.EventItem'
    00051	     RespawnTime=0.000000
    00052	     StaticMesh=StaticMesh'MeshObjetsPickup.clef'
    00053	     MessageClass=Class'XIII.XIIIImportantItemMessage'
    00054	}

End Source Code