Jump to content
Official BF Editor Forums
Sign in to follow this  
cobra

Destroying Missile In Flight

Recommended Posts

TimeToLive maybe? afaik thats the way grenades explode.

Also in 2142 there's a rocket launcher with the ability to choose at what distance the rockets explode.

I looked into it a bit and I found this:

ObjectTemplate.fire.useDistanceCounter 1
ObjectTemplate.fire.distanceStep 2
ObjectTemplate.fire.minimumDistance 20

this was at the end of that rocket launcher's (single)fireComp.

Maybe it will work with bf2.I dont know myself.

Share this post


Link to post
Share on other sites

No,no,I know that,but i don't wont it.

I want to destroy missile in flight,when i shooting in missile.

Edited by cobra

Share this post


Link to post
Share on other sites

I think you want to add armor to the missile, so it can be destroyed if you shoot it.

Hmm maybe :unsure:

But how to do this?

Edited by cobra

Share this post


Link to post
Share on other sites

Right here mate:

rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 100
ObjectTemplate.armor.hitPoints 100
ObjectTemplate.armor.defaultMaterial 26
rem ---EndComp ---

Paste it anywhere in your code.

Change hitPoints and material to your liking, keep in mind that maxHitPoints and hitPoints has to be the same. Now the material is set to armor_1_metal_plating, you can find full list in common_server/material/materialManagerDefine. Search for the name you want and line above should be like "material.active 26"-remember that number and set ObjectTemplate.armor.defaultMaterial to that number.

:)

Edited by dodek96_pl

Share this post


Link to post
Share on other sites
i thought making a missile destroyable didnt work in bf2,you can always try.

ditto, i thought Dice removed that feature via patch sometime soon after v1.0

with my own experiments, adding armour would let me knock the missile off its flightpath - it would then turn in really fast stupid circles - but i don't think i ever got it to be destructible

but if you still want to look into this, remember to make your missile's physics type 'mesh' instead of 'point'

Share this post


Link to post
Share on other sites

I've got no experience in the situation, but I can make a shotgun in 2142 fire a gunship, and that has armor. So if you really want to achieve this you could make it shoot a missile, only make it a PCO no one can enter.

Assuming the armor method won't work.

Edited by Freeze

Share this post


Link to post
Share on other sites

Right here mate:

rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 100
ObjectTemplate.armor.hitPoints 100
ObjectTemplate.armor.defaultMaterial 26
rem ---EndComp ---

Paste it anywhere in your code.

Change hitPoints and material to your liking, keep in mind that maxHitPoints and hitPoints has to be the same. Now the material is set to armor_1_metal_plating, you can find full list in common_server/material/materialManagerDefine. Search for the name you want and line above should be like "material.active 26"-remember that number and set ObjectTemplate.armor.defaultMaterial to that number.

:)

Thanks,but dont work :( I added that to tweak of missile,and when i shoot in missile with Phalanx gun,missile is still alive...

Edited by cobra

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...