XIDMaps
Class Usa01Bombe

source: C:\XIII\XIDMaps\Classes\Usa01Bombe.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Powerups
            |
            +--XIII.XIIIItems
               |
               +--XIII.EventItem
                  |
                  +--XIDMaps.Usa01Bombe
Direct Known Subclasses:None

class Usa01Bombe
extends XIII.EventItem

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 Actor BombInteraction

States
idle

Function Summary
 
simulated
PlayUsing()
     
//_____________________________________________________________________________


State idle Function Summary



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class Usa01Bombe extends EventItem;
00005	
00006	var actor BombInteraction;
00007	
00008	//_____________________________________________________________________________
00009	simulated function PlayUsing()
00010	{
00011	//    Log(self@"PlayUsing");
00012	    PlayAnim('Fire', 2.0);
00013		SetTimer2(0.7, false);
00014	//    PlaySound(ActivateSound); // not playing sound when using, only when efficiently using
00015	}
00016	
00017	
00018	//_____________________________________________________________________________
00019	event Timer2()
00020	{
00021	  XIIIGameInfo(Level.Game).MapInfo.SetGoalComplete(97);
00022	}
00023	
00024	
00025	//_____________________________________________________________________________
00026	state idle
00027	{
00028		simulated function Activate()
00029		{
00030			local actor A;
00031	
00032			A = XIIIPlayercontroller(Pawn(Owner).controller).MyInteraction.TargetActor;
00033	
00034			if (( A == none ) || ( A != BombInteraction ))
00035				return;
00036	
00037			if ( XIIIPawn(Owner).bHaveOnlyOneHandFree && (IHand == IH_2H) )
00038				PlayerController(Pawn(owner).controller).MyHud.LocalizedMessage(class'XIIISoloMessage', 8);
00039			else
00040				GotoState('InUse');
00041		}
00042	}
00043	
00044	
00045	//_____________________________________________________________________________
00046	
00047	
00048	defaultproperties
00049	{
00050	     MeshName="XIIIArmes.fpsBombeMagnetM"
00051	     hSelectItemSound=Sound'XIIIsound.Items.BombSubSel1'
00052	     IconNumber=24
00053	     sItemName="Bomb"
00054	     PickupClassName="XIDMaps.Usa01BombePick"
00055	     ItemName="Bomb"
00056	     Event="BombUse"
00057	}

End Source Code