Jump to content
Official BF Editor Forums

Dynamic Container


JONES
 Share

Recommended Posts

Hello!

Ive been trying to get the "container_suspended" work as a dynamic static since a few days and got into some trouble, ive added the con and tweak files of it to my mods object_server.zip and replaced the codelines with them from the "container_suspended_2" tweak, since the model of the second container is not visible in the editor i changed the lines of the tweak to the working container, its basicly the same model and should work, i got already dynamic barrels working with this methode. Here my tweak file:

container_suspended.tweak

rem *** Generated with Bf2Editor.exe [created: 2005/1/18 11:44]
GeometryTemplate.setSubGeometryLodDistance 0 0 50
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe DynamicBundle container_suspended
ObjectTemplate.creator DSU-1:dsu
ObjectTemplate.modifiedByUser gti
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 10000
ObjectTemplate.armor.hitPoints 1
ObjectTemplate.armor.defaultMaterial 70
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.wreckHitPoints 9000
ObjectTemplate.armor.timeToStayAsWreck 300
rem ---EndComp ---
ObjectTemplate.geometry container_suspended
ObjectTemplate.setCollisionMesh container_suspended
ObjectTemplate.mapMaterial 0 metal_solid 20
ObjectTemplate.mapMaterial 1 Obj_imp_large 83
ObjectTemplate.mapMaterial 2 Obj_imp_large 83
ObjectTemplate.mass 1000
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.isSleeping 1
ObjectTemplate.material 0
rem -------------------------------------
ObjectTemplate.addTemplate HeatObject_flare
ObjectTemplate.setPosition 0/7.67726/0
ObjectTemplate.killHeatSeekingMissile 1
rem -------------------------------------
ObjectTemplate.respawnDelay 3600

Ive got the idea from one of the bf2 beta demonstation videos which shows the same container falling off the cranhook when you shoot explosives at it seen here

at 1:40

Thought the problem now is, when i go ingame to test the dynamic container it does not appear ingame, anyone have an idea what could cause that?

Here a picture of the container:

containersuspended.th.jpg

Edited by JONES
Link to comment
Share on other sites

Yeah ive got it now ingame aswell, it happes the same as with yours, will try to add a wreck to it and linking it to the "container_cargo_red" object, so when i shoot it, the unsuspended container should apear as a wreck and fall off the crane, hope i get it to work, wish me luck

Link to comment
Share on other sites

So im stuck, ive got the container without suspension to spawn as soon the suspended one get shot, now how can i let it fall off the crane, at the moment it last in midair even with ObjectTemplate.hasMobilePhysics 1 added to the code...

Here how my tweaks are looking at the moment:

My effect tweak (yes ive also got a con that leads to the tweak)

Objects_server.zip\staticobjects\Effects\impacts\Destruction\e_container\e_container.tweak

rem *** Generated with Bf2Editor.exe [created: 2005/4/4 13:40]
ObjectTemplate.activeSafe EffectBundle e_container
ObjectTemplate.modifiedByUser dsu
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.createdInEditor 1
ObjectTemplate.hasMobilePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate S_e_container_Start
ObjectTemplate.addTemplate em_e_container_wreck1
rem -------------------------------------
ObjectTemplate.setStartOnEffects 0
ObjectTemplate.setStopOnEffects 0
ObjectTemplate.timeToLive CRD_NONE/-1/0/0
ObjectTemplate.randomAgeFactor CRD_NONE/1/0/0
ObjectTemplate.startAtCreation 0
ObjectTemplate.speedFromPhysics 0

ObjectTemplate.activeSafe Sound S_e_container_Start
ObjectTemplate.modifiedByUser dsu
ObjectTemplate.soundFilename "objects/effects/sounds/barrel/tunna_explode_01.wav,objects/effects/sounds/barrel/tunna_explode_02.wav,objects/effects/sounds/barrel/tunna_explode_03.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 1
ObjectTemplate.volume 1
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.9/1.1/
ObjectTemplate.volumeEnvelope 0/1/0/1/1/1/0/0.95/1/
ObjectTemplate.minDistance 15
ObjectTemplate.halfVolumeDistance 40

ObjectTemplate.create Emitter em_e_container_wreck1
ObjectTemplate.modifiedByUser dsu
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.template container_cargo_red
ObjectTemplate.intensity CRD_NONE/10/0/0
ObjectTemplate.positionalSpeedInDof CRD_UNIFORM/2/-2/0
ObjectTemplate.positionalSpeedInUp CRD_UNIFORM/14/18/0
ObjectTemplate.positionalSpeedInRight CRD_UNIFORM/2/-2/0
ObjectTemplate.rotationalSpeedInDof CRD_UNIFORM/3/-2/0
ObjectTemplate.rotationalSpeedInUp CRD_NONE/2/1/0
ObjectTemplate.rotationalSpeedInRight CRD_UNIFORM/2/1/0
ObjectTemplate.startRotation CRD_NONE/0/0/0
ObjectTemplate.zRotation CRD_NONE/0/0/0
ObjectTemplate.zRotationSnap 1

And the suspended container:

Objects_server.zip\staticobjects\industry\ind_objects\container_suspended\container_suspended.tweak

rem *** Generated with Bf2Editor.exe [created: 2005/1/18 11:44]
GeometryTemplate.setSubGeometryLodDistance 0 0 50
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe DynamicBundle container_suspended
ObjectTemplate.creator DSU-1:dsu
ObjectTemplate.modifiedByUser gti
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 10000
ObjectTemplate.armor.hitPoints 1
ObjectTemplate.armor.defaultMaterial 70
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.wreckHitPoints 9000
ObjectTemplate.armor.timeToStayAsWreck 300
ObjectTemplate.armor.addArmorEffect 0 e_container 0/0/0 0/0/0
rem ---EndComp ---
ObjectTemplate.geometry container_suspended
ObjectTemplate.setCollisionMesh container_suspended
ObjectTemplate.mapMaterial 0 metal_solid 20
ObjectTemplate.mapMaterial 1 Obj_imp_large 83
ObjectTemplate.mapMaterial 2 Obj_imp_large 83
ObjectTemplate.mass 1000
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.isSleeping 1
ObjectTemplate.material 0
rem -------------------------------------
ObjectTemplate.addTemplate HeatObject_flare
ObjectTemplate.setPosition 0/7.67726/0
ObjectTemplate.killHeatSeekingMissile 1
rem -------------------------------------
ObjectTemplate.respawnDelay 3600

Edited by JONES
Link to comment
Share on other sites

i would do this differently...

make the hook an invisible platform for the container to sit on,then the hook wreck has no platform so it should drop the container,the container will need to be a bundledmesh for it to use mobile physics correctly.

.

your opinion may differ.

Edited by BEEX
Link to comment
Share on other sites

ahh wait, i habe not any modeling experiance or whatsoever, only thing i do is editing tweakfiles, ive got dynamic barrels working already, thought letting the container drop off the crane is only some tweak lines away, your suggestion makes it much harder for my experiance ;) the container with the suspension cut off when i shoot a rocket at it and spawn the one wihtout ropes attached with that code, it just doesnt drop down, as mentioned

EDIT:

Got it to work see my next post :)

Edited by JONES
Link to comment
Share on other sites

Nope, was the effect rotational and positional speed modifiers,i took them from the explosive barrels when i first did my effect tweak file, than i realised that i just have to reset the crd uniforms to zero and the result is what i wanted:

http://www.youtube.com/watch?v=FHwDkEup3gw

So it works, finaly ;)

Edited by JONES
Link to comment
Share on other sites

  • 7 months later...

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

×
×
  • Create New...