Lighting Atached To Unit CTD
Posted: Tue Jan 06, 2009 10:38 pm
I have been playing around with trying to attach a light to a unit, and I saw the videos of a BFII flashlight here and here. So far all of my attempts to make my own have CTDed.
I looked at PsychoFred's lighting docs, but I still can't get it to work. Here is my code so far.
helmet_light.fx
And here is the code I used to attach it to a unit:
Can anyone help me? Does anyone have the effect from the video that I could look at and figure out how to make my own?
EDIT:
Okay, slight success, I think. It will only light up some things, and only a tiny bit. Then again, it might be the way the map is lit. Here's the code:
Helmet_Light.odf:
Added to unit with this:
I looked at PsychoFred's lighting docs, but I still can't get it to work. Here is my code so far.
helmet_light.fx
Code: Select all
LightBeam(“helmet_light”)
{
Color(255, 255, 255, 255);
Length(20.0);
Position(0.05, 0, 0.05);
Direction(1.0, 0, 0);
InitialWidth(0.3, 0.3); // elliptical start
FinalWidth(10.0, 10.0); // elliptical end
FlareIntensity(0.1);
FlareAngle(10);
}Code: Select all
AttachEffect = "helmet_light"
AttachToHardpoint = "bone_head"EDIT:
Okay, slight success, I think. It will only light up some things, and only a tiny bit. Then again, it might be the way the map is lit. Here's the code:
Helmet_Light.odf:
Code: Select all
[GameObjectClass]
ClassLabel = "Light"
[Properties]
Color = "200 200 200 250"
ConeLength = 20
ConeWidth = "4.0"
ConeInitialWidth = "0.8 0.8"
ConeFadeFactor = 0.2
ConeFadeLength = 0.1
BeamIntensity = 0.8
DrawDistance = 20
FlareIntensity = 0
FlickerType = "None"
OmniRadius = 0Code: Select all
AttachDynamic = "1"
AttachOdf = "Helmet_Light"
AttachToHardpoint = "bone_head"