SFItem.SFADrug

00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
//=============================================================================
// Spatial Fear
// Class: SFADrug 
// Description: An active item that increases the player accuracy permanently.
//
// Created by: Ivan Tanzuira
// Modified by: Markus Nuebel
//=============================================================================
class SFADrug expands SFPickup;


#exec MESH IMPORT MESH=SFADrug ANIVFILE=MODELS\SFADrug_a.3d DATAFILE=MODELS\SFADrug_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=SFADrug X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=SFADrug SEQ=All     STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=SFADrug SEQ=SFADrug STARTFRAME=0 NUMFRAMES=1

#exec TEXTURE IMPORT NAME=JSFADrug1 FILE=TEXTURES\SFADrug1.PCX GROUP=Skins FLAGS=2 // 1 - Default

#exec MESHMAP NEW   MESHMAP=SFADrug MESH=SFADrug
#exec MESHMAP SCALE MESHMAP=SFADrug X=0.01 Y=0.01 Z=0.02

#exec MESHMAP SETTEXTURE MESHMAP=SFADrug NUM=1 TEXTURE=JSFADrug1


var (SpatialFear) float AccuracyIncrease; //The amount of accuracy increase this upgrade provides. Default: 0.1 (10%) 

// Called when the upgrade is activated
// Upgrades the players speed with the configured amount
function Activate()
{
	local SFPlayer	oPlayer;

	// Get the player reference
	oPlayer	= SFPlayer(Owner);
	if(None == oPlayer)
		return;

	// Upgrade the player speed
	oPlayer.increasePenalty(AccuracyIncrease);

	// Call to base class
	Super.Activate();

}

state Activated
{
	function Endstate()
	{
		bActive = false;		
	}
	
	function BeginState()
	{
		PlaySound(ActivateSound,,4.0);

		// Upgrade already done, remove item from belt
		SFHUD(SFPlayer(Owner).myHUD).removeFromActiveItemBelt(Self);

		UsedUp();
	}
	
Begin:
}

state DeActivated
{
Begin:
}

defaultproperties
{
     AccuracyIncrease=0.100000
     ItemDescription="Accuracy Drug:\nA Bio-chemical Enhancement.\nThe chemical contained within will increase the wearer's firing accuracy by a rate of 10%.\nATTENTION: Unauthorized use of this product can result in a loss of wages, and/or criminal punishment."
     ItemIcon=Texture'SfResource1.Icons.AccDrugIco'
     bIsActiveItem=True
     bActivatable=True
     ItemName="Accuracy Drug"
     PlayerViewMesh=LodMesh'SFItem.SFADrug'
     PickupViewMesh=LodMesh'SFItem.SFADrug'
     PickupSound=Sound'UnrealShare.Pickups.GenPickSnd'
     ActivateSound=Sound'UnrealI.Pickups.fFieldh2'
     RemoteRole=ROLE_DumbProxy
     Mesh=LodMesh'SFItem.SFADrug'
     AmbientGlow=32
}

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:44 PM
Created with UnCodeX