SFItem.SFSmartVest

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
//=============================================================================
// Spatial Fear
// Class: SFSmartVest
// Description: Subclass of SFDamageProtection, implements an intellegent armor power up.
//
// Created by: Scott Sutherland
// Modified by: Markus Nuebel
//=============================================================================

class SFSmartVest extends SFDamageProtection;

var (SpatialFear) Sound ActivatedSound; // Sound played during usage (health upgrade)
var (SpatialFear) Sound EmptySound; // Sound played when an empty vest is tried to be activated.
var (SpatialFear) Sound NotNeededSound; // Sound played when a vest activation is tried in a state of 100% health or more

#exec MESH IMPORT MESH=SFSmartVest ANIVFILE=MODELS\SFSmartVest_a.3d DATAFILE=MODELS\SFSmartVest_d.3d X=0 Y=0 Z=0 MLOD=0
#exec MESH ORIGIN MESH=SFSmartVest X=-245 Y=270 Z=-200

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

#exec TEXTURE IMPORT NAME=JSFSmartVest0 FILE=TEXTURES\SFSmartVest0.PCX GROUP=Skins FLAGS=2 

#exec MESHMAP NEW   MESHMAP=SFSmartVest MESH=SFSmartVest
#exec MESHMAP SCALE MESHMAP=SFSmartVest X=0.02 Y=0.02 Z=0.04

#exec MESHMAP SETTEXTURE MESHMAP=SFSmartVest NUM=0 TEXTURE=JSFSmartVest0


// Called when the smart vest is activated
function Activate()
{
	local int fHealth;

	fHealth = Pawn(Owner).Health;
	
	// Max health reached
	if(100 <= fHealth)
	{
		PlaySound(NotNeededSound);
		return;
	}
	
	// Some health left?
	if( 0 == HealingAmount)
	{
		PlaySound(EmptySound);
		return;
	}

	// Play usage sound
	PlaySound(ActivatedSound);

	// Increase by amount of reservoir
	fHealth += HealingAmount;

	// You will not get more than 100 points, sorry ;)
	if(100 < fHealth)
		fHealth = 100;

	// Update player health
	Pawn(Owner).Health = fHealth;

	// Reset healing amount
	HealingAmount = 0;

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

defaultproperties
{
     ActivatedSound=Sound'SpatialFear.SpatialFear.hiss4'
     EmptySound=Sound'SpatialFear.SpatialFear.hiss2'
     NotNeededSound=Sound'UnrealShare.Generic.Beep'
     ItemDescription="SmartVest:\nA Personal Protection Unit.\nThis is a semi-sentient vest that provides partial protection against all known forms of physical dangers. "
     ItemIcon=Texture'SfResource1.Icons.SmartVestIco'
     bIsActiveItem=True
     ItemName="SmartVest"
     PlayerViewMesh=Mesh'SFItem.SFSmartVest'
     PickupViewMesh=Mesh'SFItem.SFSmartVest'
     PickupSound=Sound'Botpack.Pickups.UTHealth'
     Mesh=Mesh'SFItem.SFSmartVest'
     CollisionRadius=25.000000
     CollisionHeight=15.000000
}

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