# SFCharacter.SFMonsterCrawler

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 |
    //=============================================================================
    // Spatial Fear
    // Class: SFCrawler
    // Description:  Small SF enemy. Does only meele damage. Is configured as
    //					being blind by default, since the model shows no eyes.
    //
    // Created by: Markus Nuebel
    //=============================================================================

    class SFMonsterCrawler expands SFCrawler;

    #exec OBJ LOAD FILE=SPF-Content.uax  PACKAGE=SPF-Content GROUP=Creatures

    //#exec AUDIO IMPORT FILE="Sounds\Crawler\CrawlerAquisition.wav"	NAME=Aquisition PACKAGE=SFCharacter GROUP=MonsterCrawler
    //#exec AUDIO IMPORT FILE="Sounds\Crawler\CrawlerFear.wav"			NAME=Fear PACKAGE=SFCharacter GROUP=MonsterCrawler
    //#exec AUDIO IMPORT FILE="Sounds\Crawler\CrawlerRoam1.wav"		NAME=Roam PACKAGE=SFCharacter GROUP=MonsterCrawler
    //#exec AUDIO IMPORT FILE="Sounds\Crawler\CrawlerRoar.wav"			NAME=Roar PACKAGE=SFCharacter GROUP=MonsterCrawler

    function PlayRangedAttack()
    {
    	FireProjectile( vect(1.2,0,0), 750);
      	if(FRand() > 0.5)
    	  	PlayAnim('Attack1', 1.0, 0.1);
    	 else
    	  	PlayAnim('Attack2', 1.0, 0.1);
    }

    function PlayWalking()
    {
    	LoopAnim(WalkAnim, -4.0/GroundSpeed,,0.4);
    }

    function PlayRunning()
    {
    	LoopAnim(RunAnim, -3.5/GroundSpeed,,0.4);
    }

    event SmellScent(float fImportance, vector vectPosition)
    {
    	// Call to base class
    	Super.SmellScent(fImportance, vectPosition);

    	// Eventually do a ranged attack
    	if((FRand() < 0.5) && bHasRangedAttack)
    		PlayRangedAttack();
    }

    function HearNoise(float Loudness, Actor NoiseMaker)
    {
    	// Check for dumb creature;
    	if(!bCanHear)
    		return;

    	// Eventually do a ranged attack
    	if((FRand() < 0.4) && bHasRangedAttack)
    		PlayRangedAttack();

    	// Call to base class
    	Super.HearNoise(Loudness, NoiseMaker);
    }

    defaultproperties
    {
         SmellRadius=1000.000000
         fMeleeDamage=20.000000
         fStunnedTime=4.000000
         bHasRangedAttack=True
         RangedProjectile=Class'SFCharacter.SFCrawlerProjectile'
         ProjectileSpeed=10.000000
         Acquire=Sound'SPF-Content.Creatures.MonsterCrawlerAquisition'
         Fear=Sound'SPF-Content.Creatures.MonsterCrawlerFear'
         Roam=Sound'SPF-Content.Creatures.MonsterCrawlerRoam'
         MeleeRange=10.000000
         GroundSpeed=380.000000
         Health=200
         DrawScale=2.000000
         MultiSkins(1)=Texture'SFCharacter.NewSkins.crawl1'
         MultiSkins(2)=Texture'SFCharacter.NewSkins.crawl2'
         CollisionRadius=74.000000
         CollisionHeight=34.000000
         Mass=120.000000
    }

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