Page 1 of 1
Flames?
Posted: Sun Sep 09, 2007 4:17 pm
by GolfBulb
Is it possible to make a building catch on fire....
and another thing, is it possible to add like say.....all_cap_rebelcruiser_destruct_exp (example) and at the begining of the game, you will see chunks fly everywhere, like it actualy blew up, but in this case it would look like explosions oging on
Re: Flames?
Posted: Sun Sep 09, 2007 5:10 pm
by Maveritchell
It's possible to make a building catch fire, but how you do it depends on the building. If it's a building that has health, then all you have to do is add damage effects (just like with vehicles) that start at a certain amount of damage. If it's a building without health, you'd need to make 2 .odfs, one with health and one without, and when you wanted the building to catch fire, script it so that the building without fire gets killed and the building with fire is put in its place.
Re: Flames?
Posted: Sun Sep 09, 2007 5:49 pm
by GolfBulb
Maveritchell wrote:It's possible to make a building catch fire, but how you do it depends on the building. If it's a building that has health, then all you have to do is add damage effects (just like with vehicles) that start at a certain amount of damage. If it's a building without health, you'd need to make 2 .odfs, one with health and one without, and when you wanted the building to catch fire, script it so that the building without fire gets killed and the building with fire is put in its place.
okay
so if i have the yav2_bldg_temple.odf
and the ODF says
Code: Select all
[GameObjectClass]
ClassLabel = "prop"
GeometryName = "yav2_bldg_Temple.msh"
[Properties]
GeometryName = "yav2_bldg_Temple"
FoleyFXGroup = "stone_foley"
i am trying to think, would i put
MaxHealth = "30000.0" *random*
somewhere in there?
im pretty sure tahts how you do that,
and about the whole second ODF thing, i have never done something like that, could you explain please, i am quite confused

Re: Flames?
Posted: Sun Sep 09, 2007 6:00 pm
by Maveritchell
If you're gonna give the building health (i.e. you want to make it destructable), then your .odf would look something like this:
Code: Select all
[GameObjectClass]
ClassLabel = "destructablebuilding"
GeometryName = "yav2_bldg_Temple.msh"
[Properties]
MaxHealth = "30000.0"
DamageStartPercent = 55.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehicleflame"
DamageEffectScale = 1.5
DamageInheritVelocity = 0.0
DamageAttachPoint = "yav2_bldg_temple_mockv12"
GeometryName = "yav2_bldg_Temple"
FoleyFXGroup = "stone_foley"
Only thing I'm not completely sure about is that damageattachpoint. The problem is that since it's such a large prop you want to attach an effect to (and the effect can be changed or scaled to make it larger), and since the prop doesn't have any real hardpoints, there's a chance you may end up with the effect attached to the center of the model.
You shouldn't have to worry about the two-.odf thing if you want to go this route, however, there are a number of advantages - the largest being that you can use .lua scripting to make a building with fire attached to it (by combining the animations of another building and a smaller object with effect attach hardpoints) appear when a building takes a certain amount of damage. To do the two-.odf thing, you need to look into the scripting guide, which has some info on how to kill an object or how to animate an object up (and animation + scripting would be the easiest thing to do here) when another object takes a certain amount of damage and/or is destroyed.
Re: Flames?
Posted: Sun Sep 09, 2007 6:08 pm
by Caleb1117
Or, you could attach the flame effect to some really small prop.
Like make a prop odf that calls the grenade msh, and attach an effect to it.
Then place them inside the temple .msh so the effect is poking out of the msh.
As for what hardpoint to attach it to, I'm pretty sure, that if the hardpoint you specify doesn't exist it selects one at random to use. (probably the dummyroot)
Re: Flames?
Posted: Sun Sep 09, 2007 6:11 pm
by Maveritchell
Caleb1117 wrote:Or, you could attach the flame effect to some really small prop.
Like make a prop odf that calls the grenade msh, and attach an effect to it.
Then place them inside the temple .msh so the effect is poking out of the msh.
As for what hardpoint to attach it to, I'm pretty sure, that if the hardpoint you specify doesn't exist it selects one at random to use. (probably the dummyroot)
Maveritchell wrote:by combining the animations of another building and a smaller object with effect attach hardpoints
Pretty sure that if it can't find a hardpoint, it doesn't attach an effect. And you can't always use "dummyroot," since not all the meshes use dummyroot as the null hardpoint. You need to search through the meshes with a hex editor to find the hardpoints.
Re: Flames?
Posted: Sun Sep 09, 2007 6:15 pm
by GolfBulb
Maveritchell wrote:If you're gonna give the building health (i.e. you want to make it destructable), then your .odf would look something like this:
Code: Select all
[GameObjectClass]
ClassLabel = "destructablebuilding"
GeometryName = "yav2_bldg_Temple.msh"
[Properties]
MaxHealth = "30000.0"
DamageStartPercent = 55.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehicleflame"
DamageEffectScale = 1.5
DamageInheritVelocity = 0.0
DamageAttachPoint = "yav2_bldg_temple_mockv12"
GeometryName = "yav2_bldg_Temple"
FoleyFXGroup = "stone_foley"
Only thing I'm not completely sure about is that damageattachpoint. The problem is that since it's such a large prop you want to attach an effect to (and the effect can be changed or scaled to make it larger), and since the prop doesn't have any real hardpoints, there's a chance you may end up with the effect attached to the center of the model.
You shouldn't have to worry about the two-.odf thing if you want to go this route, however, there are a number of advantages - the largest being that you can use .lua scripting to make a building with fire attached to it (by combining the animations of another building and a smaller object with effect attach hardpoints) appear when a building takes a certain amount of damage. To do the two-.odf thing, you need to look into the scripting guide, which has some info on how to kill an object or how to animate an object up (and animation + scripting would be the easiest thing to do here) when another object takes a certain amount of damage and/or is destroyed.
mm okay okay.... ill munge right now and see if it worked, and another thing, if i have 2 ODFS then would i hve to add 2 Buildings in the exact same place, and then if you shoot it enough the other one would catchn on fire?
EDIT: nope , i dont knwo how much i was to give damage to it but i repeatidly tried to but nothing happeend
here is the ODF
Code: Select all
[GameObjectClass]
ClassLabel = "destructablebuilding"
GeometryName = "yav2_bldg_Temple.msh"
[Properties]
MaxHealth = "50000.0"
DamageStartPercent = 55.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehicleflame"
DamageEffectScale = 1000.5
DamageInheritVelocity = 0.0
DamageAttachPoint = "yav2_bldg_temple_mockv12"
GeometryName = "yav2_bldg_Temple"
FoleyFXGroup = "stone_foley"
I put the scale up so high jsut to make sure i saw it, i think i jsut spotted the problem, the Start precent is set as 55 percent........ jsut incase please read threw it
Re: Flames?
Posted: Sun Sep 09, 2007 6:22 pm
by Maveritchell
There are a bunch of ways to do it, and they depend on exactly what you want to happen. Do you want the building to eventually be able to be destroyed? Do you want it to just catch on fire after a certain amount of damage? What?
Re: Flames?
Posted: Sun Sep 09, 2007 6:27 pm
by GolfBulb
Maveritchell wrote:There are a bunch of ways to do it, and they depend on exactly what you want to happen. Do you want the building to eventually be able to be destroyed? Do you want it to just catch on fire after a certain amount of damage? What?
catch on fire after a certain amount of damage
PS: read above post
Re: Flames?
Posted: Sun Sep 09, 2007 10:56 pm
by Maveritchell
The damageeffectpercent just specifies when the damage effect becomes visible, in this case at 55% health. If you lowered the building's health to that, and still can't see it, it's cause the hardpoint is located in a bad position, like somewhere inside the model.
I think the best solution to your problem would be to:
1) Learn how to use an object's destruction to trigger an animation (and know how to animate in ZE) through .lua coding,
then, once you can do that, you can
2) Create a destructible prop with say, 60% health you want for the building's maxhealth. If you want, (and I think it'd be a good idea) create an explosion in the .odf (a large one) that triggers on the building's death.
3) Use .lua coding to animate a building (that uses the same model, but has a different health, say 40% of the building's total desired health) into the same position as the prior building. (Make it a fast animation, so that it's nearly instantaneous.)
4) Use .lua coding to animate a small object with a hardpoint to attach an effect to (like caleb and I mentioned earlier) up to the position just inside the model you want the building to be on fire. Attach an effect to the small object in the .odf.
The end result here is a building that takes a certain amount of damage and then explodes into flame.
Re: Flames?
Posted: Mon Sep 10, 2007 7:00 am
by GolfBulb
Maveritchell wrote:The damageeffectpercent just specifies when the damage effect becomes visible, in this case at 55% health. If you lowered the building's health to that, and still can't see it, it's cause the hardpoint is located in a bad position, like somewhere inside the model.
I think the best solution to your problem would be to:
1) Learn how to use an object's destruction to trigger an animation (and know how to animate in ZE) through .lua coding,
then, once you can do that, you can
2) Create a destructible prop with say, 60% health you want for the building's maxhealth. If you want, (and I think it'd be a good idea) create an explosion in the .odf (a large one) that triggers on the building's death.
3) Use .lua coding to animate a building (that uses the same model, but has a different health, say 40% of the building's total desired health) into the same position as the prior building. (Make it a fast animation, so that it's nearly instantaneous.)
4) Use .lua coding to animate a small object with a hardpoint to attach an effect to (like caleb and I mentioned earlier) up to the position just inside the model you want the building to be on fire. Attach an effect to the small object in the .odf.
The end result here is a building that takes a certain amount of damage and then explodes into flame.
hmm ill try but i have done nothign liek this befor and i doubt it would be in the documentation