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

ExampleVehicles.ChrisPawn


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
class ChrisPawn extends Engine.Pawn;

var Name WepAttachBone;	// Name of the bone to attach the weapon to

simulated event PostBeginPlay()
{
	local Weapon Gun;

//	Gun = Spawn( class'UDNContent.Zapper' );
	if( Gun != None )
	{
		Gun.GiveTo(self);
		if ( Gun != None )
		Gun.PickupFunction(self);
		Gun.GiveAmmo(self);
	}
}


function Fire( optional float F )
{
	local Engine.Actor C;
	local vector startVel;
	startVel.Y = 500;
	ForEach AllActors(class 'Engine.Actor', C)
	{
	// 
		if( (C.Physics != PHYS_HavokSkeletal) && 
		     (C.HavokData!=None) &&
		     (C.HavokData.IsA('HavokSkeletalSystem')) )
		{
			C.SetPhysics( PHYS_HavokSkeletal );	// to ragdoll
			
			C.HavokSetLinearVelocityAll( startVel );
		}
		else if( C.Physics == PHYS_HavokSkeletal ) // kill havok.
			C.SetPhysics( PHYS_None );		// from ragdoll
	}

	Super.Fire(F);
}


function name GetWeaponBoneFor(Inventory I)
{
	return WepAttachBone;
}

simulated function PlayWaiting()
{
	PlayAnim('idleknukles');
}

defaultproperties
{
	Mesh=SkeletalMesh'UDN_CharModels_K.GenericMale'
	MovementAnims(0)="frun"
	MovementAnims(1)="brun"
	MovementAnims(2)="lrun"
	MovementAnims(3)="rrun"
	bPhysicsAnimUpdate=true
	bHavokCharacterCollisions=false
	bBlockHavok=false;	
	bCollideActors=false;
	
//	WepAttachBone="Bip02 L Arm"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 16:02:08.000 - Creation time: st 23.5.2018 00:10:42.798 - Created with UnCodeX