Help with Decals

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Help with Decals

Post by Parts »

Hi,

I've searched the forums and not found much help on this. I'm creating a bleeding mod. Once a player is injured their health will gradually drop until they go to a medic to be healed. I have this all working fine.

What I would like to have is as the player loses health they leave a trail of blood behind them.

I figured I ought to be able to do that by using the blood decals. However I'm not sure how. Can anyone help me with this?
[VS-UK]Capt.Parts[BnHQ]
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post by Parts »

I've made some progress on this. I've created a TIK file that looks as follows:

Code: Select all

TIKI
setup
{
	scale 0.75
	path models/fx/splinter
	skelmodel splinter.skd
	surface material1 shader blood_bled
}
animations
{
	idle splinter.skc
}
I've created a shader as follwos:

Code: Select all

blood_bled
{
	polygonOffset
	{
		map textures/effects/blood_splat.tga
		blendFunc blend
		rgbGen vertex
		alphaGen vertex
	}
}
I've placed these plus the tga in a pk3 and distributed to the server and the client.

Works fine for me but other players on the server just see white blobs rather than the blood texture. Anyone know why this could be?

They have the file, they have static decals turned on and compression off.
[VS-UK]Capt.Parts[BnHQ]
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Do they have both the .shader and the .tga / .jpg file? Oh and the .tik file?
Image
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post by Parts »

yep they have it all, identical tik to me
[VS-UK]Capt.Parts[BnHQ]
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm strange... The .skd and .skc files, are they standard mohaa files?
Image
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post by Parts »

What a fool, had the tga file named wrong. I had a blood mod with the tga named in the shader hence looked ok to me!

Will teach me not to mod at 1a.m.!

Thanks
[VS-UK]Capt.Parts[BnHQ]
Post Reply