Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UnrealShare.Translator


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
//=============================================================================
// Translator.
//=============================================================================
class Translator expands Pickup;

#exec AUDIO IMPORT FILE="Sounds\Pickups\HEALTH1.WAV" NAME="HEALTH1" GROUP="Pickups"

#exec TEXTURE IMPORT NAME=I_Tran FILE=TEXTURES\HUD\i_TRAN.PCX GROUP="Icons" MIPS=OFF

#exec MESH IMPORT MESH=TranslatorMesh ANIVFILE=MODELS\tran_a.3D DATAFILE=MODELS\tran_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=TranslatorMesh X=0 Y=0 Z=0 YAW=0
#exec MESH SEQUENCE MESH=TranslatorMesh SEQ=All    STARTFRAME=0  NUMFRAMES=1
#exec TEXTURE IMPORT NAME=JTranslator1 FILE=MODELS\tran.PCX GROUP="Skins" 
#exec MESHMAP SCALE MESHMAP=TranslatorMesh X=0.04 Y=0.04 Z=0.08
#exec MESHMAP SETTEXTURE MESHMAP=TranslatorMesh NUM=1 TEXTURE=JTranslator1

var() localized string[255] NewMessage;
var localized string[255] Hint;
var bool bNewMessage, bNotNewMessage, bShowHint, bCurrentlyActivated;

replication
{
    // Things the server should send to the client.
    reliable if( Role==ROLE_Authority && bNetOwner )
        NewMessage, bNewMessage, bNotNewMessage, bCurrentlyActivated;
}

function TravelPreAccept()
{
    if ( Pawn(Owner).FindInventoryType(class) == None )
        Super.TravelPreAccept();
}
        
state Activated
{
    function BeginState()
    {
        bActive = true;
        bCurrentlyActivated = true;
    }

    function EndState()
    {
        bActive = false;
        bCurrentlyActivated = false;
    } 
}

state Deactivated
{
Begin:
    bShowHint = False;
    bNewMessage = False;
    bNotNewMessage = False;
}

function ActivateTranslator(bool bHint)
{
    if (bHint && Hint=="")
    {
        bHint=False;
        Return;
    }
    bShowHint = bHint;
    Activate();
}

defaultproperties
{
     NewMessage="Universal Translator"
     bActivatable=True
     bDisplayableInv=True
     PickupMessage="Press F2 to activate the Translator"
     PickupViewMesh=Mesh'UnrealShare.TranslatorMesh'
     PickupSound=Sound'UnrealShare.Pickups.GenPickSnd'
     Icon=Texture'UnrealShare.Icons.I_Tran'
     Mesh=Mesh'UnrealShare.TranslatorMesh'
     bMeshCurvy=False
     CollisionHeight=5.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sun 21/2/2010 23:48:40.000 - Creation time: Sun 21/2/2010 23:49:53.989 - Created with UnCodeX