Cod4 Sog knife model + Blood

   (0 reviews)
Sign in to follow this  

About This File

Cod4 Sog knife model with blood splat.

 

_globallogic.gsc example.

 

init()
{
	level.fx_extrablood = LoadFX( "knifermod/flesh_hit_knife" );
	level.fx_bloodpool = LoadFX( "knifermod/bloodpool" );	
}

Callback_PlayerDamage(eInflictor,eAttacker,iDamage,iDFlags,sMeansOfDeath,sWeapon,vPoint,vDir,sHitLoc,psOffsetTime)
{
	if( sMeansOfDeath == "MOD_MELEE" )
	{
		PlayFX( level.fx_extrablood, self.origin+(0,0,32) );
		eAttacker thread AddBloodHud();
	}
}

Callback_PlayerKilled(eInflictor,attacker,iDamage,sMeansOfDeath,sWeapon,vDir,sHitLoc,psOffsetTime,deathAnimDuration)
{
	body = self clonePlayer( deathAnimDuration );
	body.targetname = "dr_deadbody";
	if( isDefined( body ) )
	{
		body thread delayBloodPool();
		PlayFX( level.fx_money, self.origin );
	}
}

delayBloodPool()
{
	wait 2;
	if( isDefined( self ) )
		PlayFX( level.fx_bloodpool, self.origin );
}

AddBloodHud()
{
	self endon( "disconnect" );

	hud = NewClientHudElem( self );
	hud.alignX = "center";
	hud.alignY = "middle";
	hud.horzalign = "center";
	hud.vertalign = "middle";
	hud.alpha = 1;
	hud.x = RandomIntRange(-320,320);
	hud.y = RandomIntRange(-240,240);
	hud setShader( "bloodsplat" + (RandomInt(3)+1), 512, 512 );
	wait 1;
	hud FadeOverTime(3);
	hud.alpha = 0;
	wait 3;
	hud destroy();
}

 

  • Thanks 1



User Feedback

Recommended Comments

There are no comments to display.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.