How do I give an object health?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

How do I give an object health?

Post by Fierfek »

How do I do it? I can't get it working.
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: How do I give an object health?

Post 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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: How do I give an object health?

Post 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?
User avatar
[TFA]Padawan_Fighter
High General
High General
Posts: 806
Joined: Wed Mar 25, 2009 3:37 pm
Projects :: Ha - as if I will ever get back to them
Games I'm Playing :: SWBF2 ARK EliteDngrs
xbox live or psn: No gamertag set
Location: Lost at sea

Re: How do I give an object health?

Post 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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: How do I give an object health?

Post 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.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: How do I give an object health?

Post by DarthD.U.C.K. »

a destructible object needs a appropriate class (destructablebuilding or armedbuilding etc)
and line that defines the health i think
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

Re: How do I give an object health?

Post 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).
Post Reply