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

2 Questions(Solved)

Recommended Posts

My questions are:

How to create 3d sights?

How to make explosive barrels dynamic?

I already have blue and green barrels dynamic, but the problem with the petrol can is that it's a DestroyableObject.

To make stuff dynamic I need DynamicBundle. So how do I have them both?

Edited by Lauryxy

Share this post


Link to post
Share on other sites

1.

3D sights use lod models in either the camera or the weapon mesh.

Vehicles use an added camera with the sub geometry set. (this is optional, geometry is set to 0 by default)

ObjectTemplate.create Camera ARS_D30_Camera
ObjectTemplate.modifiedByUser Unknown
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.hasMobilePhysics 0
rem -------------------------------------
ObjectTemplate.addTemplate S_ARS_D30_Camera_RotationRpm
rem -------------------------------------
ObjectTemplate.CVMChase 1
ObjectTemplate.CVMFrontChase 1
ObjectTemplate.CVMInside 1
ObjectTemplate.worldFOV 1.1
ObjectTemplate.insideFOV 0.6
ObjectTemplate.cockpitSubGeom 1
ObjectTemplate.allowInsideDynamicLights 1
ObjectTemplate.allowInsideStaticSun 0
ObjectTemplate.insideStaticSunDirection 0/-1/0
ObjectTemplate.insideStaticSunColor 1/1/1
ObjectTemplate.insideStaticSunDamageColor 1/1/1
ObjectTemplate.insideDamageFrequency 3
ObjectTemplate.insideDamageThreshold 0.15
ObjectTemplate.insideStaticSunAmbientColor 0.7/0.7/0.7

ObjectTemplate.cockpitSubGeom 1

In a weapon zoom lod (sub model in a geometry) is used:

rem ---BeginComp:DefaultZoomComp ---
ObjectTemplate.createComponent DefaultZoomComp
ObjectTemplate.zoom.zoomDelay 0.08
ObjectTemplate.zoom.zoomLod 1
ObjectTemplate.zoom.addZoomFactor 0
ObjectTemplate.zoom.addZoomFactor 0.85
ObjectTemplate.zoom.changeFovDelay 0.05
rem ---EndComp ---

ObjectTemplate.zoom.zoomLod 1

2.

Regular pco's are mobile as well.

rem *** Generated with Bf2Editor.exe [created: 2005/4/10 10:26]
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe PlayerControlObject cube_brick
ObjectTemplate.creator Bergerkiller
ObjectTemplate.modifiedByUser ljo
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.castsDynamicShadow 1
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 100
ObjectTemplate.armor.hitPoints 100
ObjectTemplate.armor.defaultMaterial 3
ObjectTemplate.armor.waterLevel 0
ObjectTemplate.armor.explosionForce 15
ObjectTemplate.armor.explosionForceMod 8
ObjectTemplate.armor.explosionForceMax 5000
ObjectTemplate.armor.explosionDamage 10
ObjectTemplate.armor.explosionRadius 18
ObjectTemplate.armor.explosionMaterial 99
ObjectTemplate.armor.addArmorEffect 0 e_exp_large 0/0/0 0/0/0
rem ---EndComp ---
ObjectTemplate.setCollisionMesh cube_brick
ObjectTemplate.geometry cube_brick
ObjectTemplate.mapMaterial 0 Metal_plate_thin 20
ObjectTemplate.mass 10
ObjectTemplate.gravityModifier 0.6
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
rem -------------------------------------
rem ObjectTemplate.addTemplate 
rem -------------------------------------

You can spawn them using objectspawners; see gameplayobjects.con of the level. You can add objectspawners to other templates as well, although this is risky.

Beware: adding objectspawners to effects will not always work online.

Share this post


Link to post
Share on other sites

1.Ok maybe I don't understand what dynamic means. I thought that it means that physics apply to that object like it is with Alpha Project barrels(and the container). I already have the physics applied to blue and green barrels, but not the explosive one.

HasMobilePhysics didn't work for this. That was the first thing I tried and then I came across this topic and from these tweaks I saw how to do it.

The part I'm having trouble with is this:

ObjectTemplate.activeSafe DynamicBundle barrel_green

is what is in my green/blue barrel's tweak.

In my explosive barrel tweak is

ObjectTemplate.activeSafe DestroyableObject barrel_yellow

But I need both parts in my tweak.

Both have "hasMobilePhysics 1" in their tweaks, but only the green barrel has physics.

2.Changed the zoomLod to 0 and it worked. And made me realize why the 3d sights are so small in bf2

BTW thanks for quick answer.

Edited by Lauryxy

Share this post


Link to post
Share on other sites

I suggested using a player control object since it has both. It has mobile physics using a collision mesh and has an armor component to make it destroyable.

Dynamic simply means it is "moveable". It does not mean that it can use an armor component.

Edited by bergerkiller

Share this post


Link to post
Share on other sites

Thanks! After making it pco it worked more perfectly than DynamicBundles because I noticed that by making a stack of blue barrels and shooting the bottom one. It moved away and others just floated in the air :lol: . This didn't happen with the explosive barrels now. They fell over the moment the game started :rolleyes: .

Share this post


Link to post
Share on other sites

Even thought you fixed your promblem with the dynamic barrels i am still wondering why you needed to change the object type at all. For me it works perfectly just by adding "ObjectTemplate.hasMobilePhysics 1" and "ObjectTemplate.setNetworkableInfo BasicInfo" even with a simplestaticobject.

Share this post


Link to post
Share on other sites

Well it doesn't work like that for me. Anyways it's now working fine and case closed. I'm gonna try to get 3ds max and animate those 3d sights.

Edited by Lauryxy

Share this post


Link to post
Share on other sites

Ok one strange thing - the blue barrels are invisible in singleplayer.

I do collide with them but they are invisible. some of them do have a small piece of them visible but thats for only some of them.

Share this post


Link to post
Share on other sites

Ok one strange thing - the blue barrels are invisible in singleplayer.

I do collide with them but they are invisible. some of them do have a small piece of them visible but thats for only some of them.

That is because the blue barrels are not finished and they dont have real visible mesh (only one poly), it is just another thing that was removed from the game prior release just like the M82A1. If you want blue barrels you need to make a copy of the green barrel mesh, rename it and change the texture path from
"objects/staticobjects/common/com_objects/barrel_green/textures/barrel_gw_c.dds"

to

"objects/dynamicobjects/barrel/barrel_blue/textures/barell_bw_c.dds"

Edited by Bad_santa12345

Share this post


Link to post
Share on other sites

Make explosive barrels dynamic...

Find barrel_yellow.tweak

Find:

ObjectTemplate.hasMobilePhysics 0

Replace:

ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.mass <number>

That's all.

Edited by Freeze

Share this post


Link to post
Share on other sites

Make explosive barrels dynamic...

Find barrel_yellow.tweak

Find:

ObjectTemplate.hasMobilePhysics 0

Replace:

ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.mass <number>

That's all.

I already did that(btw you need to make it a pco aswell). this is solved already.

Share this post


Link to post
Share on other sites

The mobile barrel I have is still a DestroyableObject, but I just gave it a basic info networkable. Don't think you really need to make it a pco since it's working for me as a DestroyableObject. You can't spawn it through staticobjects.con anymore, though.

Edited by Freeze

Share this post


Link to post
Share on other sites

C'mon dude I don't really care anymore because this works for me in every way that I want it to work. Maybe it all works and it didn't move because the mass was 100 and i tried to move it by shooting(which obviously doesn't work with that mass) and then thought it doesn't work but I don't care anymore.

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...