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

skaarjpack.SkaarjPupae


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
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
class SkaarjPupae extends Monster;

var name DeathAnims[3];
var bool bLunging;

function SetMovementPhysics()
{
	SetPhysics(PHYS_Falling); 
}

simulated function PlayDirectionalDeath(Vector HitLoc)
{
	PlayAnim(DeathAnims[Rand(3)], 0.7, 0.1);
}

simulated function PlayDirectionalHit(Vector HitLoc)
{
	TweenAnim('TakeHit', 0.05);
}

function PlayVictory()
{
	Controller.bPreparingMove = true;
	Acceleration = vect(0,0,0);
	bShotAnim = true;
	PlayAnim('Stab', 1.0, 0.1);
	Controller.Destination = Location;
	Controller.GotoState('TacticalMove','WaitForAnim');
}

singular function Bump(actor Other)
{
	local name Anim;
	local float frame,rate;
	
	if ( bShotAnim && bLunging )
	{
		bLunging = false;
		GetAnimParams(0, Anim,frame,rate);
		if ( Anim == 'Lunge' )
			MeleeDamageTarget(12, (20000.0 * Normal(Controller.Target.Location - Location)));
	}		
	Super.Bump(Other);
}

function RangedAttack(Actor A)
{
	local float Dist;
	
	if ( bShotAnim )
		return;
		
	Dist = VSize(A.Location - Location);
	if ( Dist > 350 )
		return;
	bShotAnim = true;
	PlaySound(ChallengeSound[Rand(4)], SLOT_Interact);
	if ( Dist < MeleeRange + CollisionRadius + A.CollisionRadius )
	{
  		if ( FRand() < 0.5 )
  			SetAnimAction('Bite');
  		else
  			SetAnimAction('Stab');
		MeleeDamageTarget(8, vect(0,0,0));
		Controller.bPreparingMove = true;
		Acceleration = vect(0,0,0);
		return;
	}
	
	// lunge at enemy
	bLunging = true;
	Enable('Bump');
	SetAnimAction('Lunge');
	Velocity = 500 * Normal(A.Location + A.CollisionHeight * vect(0,0,0.75) - Location);
	if ( dist > CollisionRadius + A.CollisionRadius + 35 )
		Velocity.Z += 0.7 * dist;
	SetPhysics(PHYS_Falling);
}

defaultproperties
{
     HitSound(0)=injur1pp
     HitSound(1)=injur1pp
     HitSound(2)=injur2pp
     HitSound(3)=injur2pp

     DeathSound(0)=death1pp
     DeathSound(1)=death1pp
     DeathSound(2)=death1pp
     DeathSound(3)=death1pp
     ChallengeSound(0)=hiss2pp
     ChallengeSound(1)=hiss1pp
     ChallengeSound(2)=roam1pp
     ChallengeSound(3)=hiss3pp
     
     bCrawler=true
	 bAlwaysStrafe=true
	 bCanStrafe=True
     Health=60
     MeleeRange=+0025.000000
     GroundSpeed=+00300.000000
     WaterSpeed=+00300.000000
     JumpZ=+00450.000000
     Mesh=Pupae1
     Skins(0)=JPupae1
     Skins(1)=JPupae1
     CollisionRadius=+00028.000000
     CollisionHeight=+00012.000000
     Mass=+00080.000000
     RotationRate=(Pitch=3072,Yaw=65000,Roll=0)
    
    AirStillAnim=Lunge
    AirAnims(0)=Lunge
    AirAnims(1)=Lunge
    AirAnims(2)=Lunge
    AirAnims(3)=Lunge
    TakeoffStillAnim=Lunge
    TakeoffAnims(0)=Lunge
    TakeoffAnims(1)=Lunge
    TakeoffAnims(2)=Lunge
    TakeoffAnims(3)=Lunge
    LandAnims(0)=Land
    LandAnims(1)=Land
    LandAnims(2)=Land
    LandAnims(3)=Land
    DodgeAnims(0)=Lunge
    DodgeAnims(1)=Lunge
    DodgeAnims(2)=Lunge
    DodgeAnims(3)=Lunge
    DoubleJumpAnims(0)=Lunge
    DoubleJumpAnims(1)=Lunge
    DoubleJumpAnims(2)=Lunge
    DoubleJumpAnims(3)=Lunge
    
    WalkAnims(0)=Crawl
    WalkAnims(1)=Crawl
    WalkAnims(2)=Crawl
    WalkAnims(3)=Crawl

    MovementAnims(0)=Crawl
    MovementAnims(1)=Crawl
    MovementAnims(2)=Crawl
    MovementAnims(3)=Crawl

    SwimAnims(0)=Crawl
    SwimAnims(1)=Crawl
    SwimAnims(2)=Crawl
    SwimAnims(3)=Crawl
    IdleSwimAnim=Crawl
    
    DeathAnims(0)=Dead
    DeathAnims(1)=Dead2
    DeathAnims(2)=Dead3

    TurnRightAnim=Crawl
    TurnLeftAnim=Crawl
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:31:54.000 - Creation time: Do 14.8.2014 09:58:50.023 - Created with UnCodeX