SFItem.SFSpeedDrug

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
//=============================================================================
// Spatial Fear
// Class: SFSpeedDrug
// Description: An active item that increases the players speed permanently.
//
// Created by: Ivan Tanzuira
// Modified by: Markus Nuebel
//=============================================================================
class SFSpeedDrug expands SFPickup;

#exec MESH IMPORT MESH=SFSpeedDrug ANIVFILE=MODELS\SFSpeedDrug_a.3d DATAFILE=MODELS\SFSpeedDrug_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=SFSpeedDrug X=0 Y=0 Z=0

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

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

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

#exec MESHMAP SETTEXTURE MESHMAP=SFSpeedDrug NUM=1 TEXTURE=JSFSpeedDrug1

var (SpatialFear) float  SpeedIncrease; //The amount of speed 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.SFPlayerSpeed(1.0+SpeedIncrease, true);

	// 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
{
     SpeedIncrease=0.100000
     ItemDescription="Speed  Drug:\nA Bio-chemical Enhancement.\nThe chemical contained within will increase the wearer's movement speed 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.SpeedIco'
     bIsActiveItem=True
     bActivatable=True
     ItemName="Speed Drug"
     PlayerViewMesh=LodMesh'SFItem.SFSpeedDrug'
     PickupViewMesh=LodMesh'SFItem.SFSpeedDrug'
     PickupSound=Sound'UnrealShare.Pickups.GenPickSnd'
     ActivateSound=Sound'UnrealI.Pickups.fFieldh2'
     RemoteRole=ROLE_DumbProxy
     Mesh=LodMesh'SFItem.SFSpeedDrug'
     AmbientGlow=32
}

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