Page 1 of 1

How do I give an object health?

Posted: Mon Aug 24, 2009 9:49 pm
by Fierfek
How do I do it? I can't get it working.

Re: How do I give an object health?

Posted: Mon Aug 24, 2009 10:05 pm
by Eggman
I'm pretty sure only certain classes of objects can have health properties. Compare the .odfs of a few objects that have health and a few that don't so you can get an idea of how you need to set up the .odf for whatever object you're trying to edit.

Re: How do I give an object health?

Posted: Mon Aug 24, 2009 10:07 pm
by Fierfek
Eggman wrote:I'm pretty sure only certain classes of objects can have health properties. Compare the .odfs of a few objects that have health and a few that don't so you can get an idea of how you need to set up the .odf for whatever object you're trying to edit.
I'm trying to edit dea1_prop_hack_panel. It originally has health, but it is just an object ingame.
Here is it's ODF:
Hidden/Spoiler:
[GameObjectClass]

ClassLabel = "destructablebuilding"
GeometryName = "dea1_prop_panel.msh"


[Properties]

GeometryName = "dea1_prop_panel"
MapTexture = "rechargedroid_icon"
MapScale = "1"
UnbuiltHoloOdf = "com_holo_build"

GeometryName = "dea1_prop_panel"
UnbuiltGeometryName = "dea1_prop_panel"
--DestroyedGeometryName = "dea1_prop_panel"

MaxHealth = 300

//AttachOdf = "mus1_light_panel_red"
//AttachToHardPoint = "hp_light"

//AttachEffect = "prop_panelspark"
//AttachToHardPoint = "hp_panel"
Do I need to activate it's health or something?

Re: How do I give an object health?

Posted: Tue Aug 25, 2009 12:00 am
by [TFA]Padawan_Fighter
You could try replacing the ODF with that of dea1_prop_panel. But it's just a guess, I don't know a whole lot about coding.

Re: How do I give an object health?

Posted: Tue Aug 25, 2009 12:07 am
by Fierfek
Hmmm....
I got the oil refinery working, so I think I'll switch it's model to the panel and lower it's health. Though a crude way to fix it, it should work.

Re: How do I give an object health?

Posted: Tue Aug 25, 2009 2:43 am
by DarthD.U.C.K.
a destructible object needs a appropriate class (destructablebuilding or armedbuilding etc)
and line that defines the health i think

Re: How do I give an object health?

Posted: Tue Aug 25, 2009 9:13 am
by Xavious
DarthD.U.C.K. wrote:a destructible object needs a appropriate class (destructablebuilding or armedbuilding etc)
and line that defines the health i think
He had both of those.

Oh, and what is this?
--DestroyedGeometryName = "dea1_prop_panel"
That's not how you comment out lines in an odf. Remove the double dash (and don't comment this line out, you need a DestroyedGeometryName).