colonel_klink 0 Posted September 18, 2004 As I require user input for this project I thought it better if the project has its own thread rather than get overlooked by my previous post on this thread:http://www.flashpoint1985.com/cgi-bin....6;st=15 I have put aside most other projects for the moment as this one is fun to work with and I think most people would agree one that has been sought for some time. So here goes: By using proxies and memory points I have been able to place objects at run time dynamically into buildings. All the objects inherit their mass, config.cpp, and scripting, unlike the proxy placed objects which have no mass and cannot be interacted with. Rather than explain how this is achieved here I am working on a series of tutorials that will go into step by step detail of how it is done. I am also compiling a FAQ on what exactly DIB is and how it works with player and AI. In the meantime there are some issues that I need to overcome in order to make this work well. 1. The destructtype sounds in OFP appear to be hardcoded except for aircraft and vehicles. can anybody confirm this? 2. or tell me how I can switch this off for the objects I am creating? (for example if I use the building class for a window the sound of a collapsing building does not sound like breaking glass, or if  use the tree class for the same window the sound of a tree falling over is not breaking glass either). If anybody wishes to contribute to this project by all means do. If this gets swallowed up here I will continue on the DC3D Forums. BTW DIB will work on any number of static type OFP object. Read FAQ Here Share this post Link to post Share on other sites
Billabong81 0 Posted September 18, 2004 To tell you the truth, I have no idea what this means . Â Do you mean like you can now place objects inside buildings that can be interacted with (ie, a chair you can sit on)? Â Sorry, just a bit confused here . EDIT: Wow, I just saw Pappy's post in the OFP CP thread...breakable doors + glass? Sounds great ! Share this post Link to post Share on other sites
Guest Posted September 18, 2004 As far as I know the sounds are hardcoded. destructtype=X seems to have all these things hardcoded into it in much the same way as simulation=X audible=0 I don't think will do anything either. Share this post Link to post Share on other sites
hardrock 1 Posted September 18, 2004 I think destrType should work, at least it does for me (tested only with vehicles. Simply add to your cfgVehicles class the following line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">destrType=DestructBuilding; There are no defines required for this to work. DestructBuilding will cause the object to make the crash sound of buildings and to transform when it's destroyed. If you like you can also use DestructNo, then nothing will happen once the object is destroyed. You then can use the killed-Eventhandler to play your custom sounds and to play some explosion scripts or anything like that. Share this post Link to post Share on other sites
Pappy Boyington 0 Posted September 18, 2004 I think destrType should work, at least it does for me (tested only with vehicles.Simply add to your cfgVehicles class the following line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">destrType=DestructBuilding; There are no defines required for this to work. DestructBuilding will cause the object to make the crash sound of buildings and to transform when it's destroyed. If you like you can also use DestructNo, then nothing will happen once the object is destroyed. You then can use the killed-Eventhandler to play your custom sounds and to play some explosion scripts or anything like that. sounds perfect. gonna try that now. will report back in a few Share this post Link to post Share on other sites
Pappy Boyington 0 Posted September 18, 2004 "DestructNo" means its invincable regular destruct it dies in 1 shot from anything.. DestructNo i unloaded 200 rounds of PKM and it didnt budge. so... any more suggestions? Share this post Link to post Share on other sites
Pappy Boyington 0 Posted September 18, 2004 ok klink if you read this before i talk to you try this destrType="destructdefault"; that fits in with the sound we have. or another option (untested) is destrType=destructtent; Share this post Link to post Share on other sites
hardrock 1 Posted September 18, 2004 "DestructNo" means its invincable regular destruct it dies in 1 shot from anything..DestructNo i unloaded 200 rounds of PKM and it didnt budge. so... any more suggestions? It isn't invincible. OFP just doesn't transform it or play any sound when it's destroyed. You can try that for example with the original OFP churches. You can fire on them as much as you like, nothing will happen. But try to run a script that checks if the church is still alive, it will only take some AGMs and the church will be destroyed. I think this DestructNo is very useful, since you can replace your model with other, damaged models, or make custom explosions and sounds without having those ugly OFP effects. Share this post Link to post Share on other sites
Pappy Boyington 0 Posted September 18, 2004 "DestructNo" means its invincable  regular destruct it dies in 1 shot from anything..DestructNo i unloaded 200 rounds of PKM and it didnt budge. so... any more suggestions? It isn't invincible. OFP just doesn't transform it or play any sound when it's destroyed. You can try that for example with the original OFP churches. You can fire on them as much as you like, nothing will happen. But try to run a script that checks if the church is still alive, it will only take some AGMs and the church will be destroyed. I think this DestructNo is very useful, since you can replace your model with other, damaged models, or make custom explosions and sounds without having those ugly OFP effects. like i said brother. i tried. it didnt die. its a one hit wonder. one shot. window dead.... i unloaded 200 rounds point blank it DID NOT DIE. im not jerkin your chain brother. . . . it didnt die. Share this post Link to post Share on other sites
Guest Posted September 18, 2004 Pappy...you clearly don't understand what he is trying to tell you. Make a hint script to show the objects damage level and you will see. I understand just fine and I think it is the right solution (although who knows what would happen in MP). Share this post Link to post Share on other sites
Pappy Boyington 0 Posted September 18, 2004 well for tasting sake there already is a script that does that (for the doors.. which was set to 'destructno') and for the door that was destructtree it told me the door is dammaged.. dammged... door dammage = 1 poof door broken... the one with destruct no never registered anything hitting it. point blank. with a PK. it didnt register any hits whats-so-ever. it sounds like a great idea on paper, but ive tried exactly what he said. word for word. and it turned them invincable Share this post Link to post Share on other sites
hardrock 1 Posted September 18, 2004 it sounds like a great idea on paper, but ive tried exactly what he said. word for word. and it turned them invincable That's strange, since for me it actually DOES work. At least for a moving vehicle. The hit-Eventhandler works, you can destroy it, killed-Eventhandler works, too. Share this post Link to post Share on other sites
Guest Posted September 18, 2004 well for tasting sake there already is a script that does that (for the doors.. which was set to 'destructno') and  for the door that was destructtree it told me the door is dammaged.. dammged... door dammage = 1 poof door broken...the one with destruct no never registered anything hitting it. point blank. with a PK. it didnt register any hits whats-so-ever. Try it with exactly the same door with both config settings. Might just be a little GeoLOD thing. Share this post Link to post Share on other sites
colonel_klink 0 Posted September 19, 2004 I don't know if anybody  remembers the sub pen I started on eons ago, anyway the thought occured to me that DIB could overcome the roadway limitations in buildings as well. With abit of thinking the light bulb came on about 3.30am this morning and I hatched a plan. Short story is the Sub pen is now a one piece model, no roadway limitation, and will have working interior lights and other gizmos as I think of them: Sub pen Page (clipping problem now resolved) DIB in Action Here is the first of many interactive objects I'm planning. Its a simple fuel barrel that reacts  to the environment quite realistically. It can be place singularly or in stacks up to 10. Ideal for fuel dumps. Just place'n'use. The barrels will come in full or empty and stacking arranements will be on their side or on their ends. More pics here. Share this post Link to post Share on other sites
colonel_klink 0 Posted September 20, 2004 Just noticed a small thing with some objects in OFP. If you place the BIS barrels on a pallet into the editopr on the side of a hill, the pallet doesn't conform to the hill slope until you fire at the object. Then the pallet adjusts to the slope. Now what I'm attempting to do is being able to place a stack of barrels on the slope, but instead of staying where they are they will roll away. In order to do this I need to simulate the impact of a bullet or other object that will cause the barrel to move thus adjust to the terrain as the pallet example above. My DIB Barrels have a mass of 200 which is a bout right to stop them bouncing merrily into the distance when given even a slight nudge with a vehicle. Any input on this would be appreciated. Share this post Link to post Share on other sites
Guest Posted September 20, 2004 initEventhandler => camcreate explosionFX underground or bullet with vector? Share this post Link to post Share on other sites
colonel_klink 0 Posted September 20, 2004 Hi Leone. I've experimented with a bullet, unfortunaely there is a dust spurt on impact. The bigger the bullet hit force the bigger the dust effect.. I might try the underground explosion.. the nudging doesn't have to be much as once the objects start moving they either settle into place or begin rolling down a hill. Share this post Link to post Share on other sites
crassus 0 Posted September 20, 2004 I'm not at your scripting level yet, Col., but does the pallet conform to the terrain because it is damaged or destroyed after being shot? Edit: Okay. Nothing but a smoking pair of pallets, crushed. ...I'll just crawl back into my hole now.... Share this post Link to post Share on other sites
korax 4 Posted September 20, 2004 Try an init EH with setvelocity [0,0,-0.01] Share this post Link to post Share on other sites
Commando84 0 Posted September 20, 2004 way cool i haven't seen many people trying to make something like this except that i heard in the Ecp thread at ofpec once that they where trying to make a system like this and replace the original bis houses with new damage models or something Hope you can make these stuff a reality one day in the near future Share this post Link to post Share on other sites
Guest Posted September 20, 2004 Try an init EH with setvelocity [0,0,-0.01] From other experiments, these things will move at the velocity only they are already moving. If it is not moving to start with, then its velocity will remian zero. Of course it might work for this sort of thing, but if it doesn't, this could be why. Share this post Link to post Share on other sites
mcpxxl 2 Posted September 20, 2004 Col Klink STOP NOW ! I can´t close my mouth the last days :-) Share this post Link to post Share on other sites
colonel_klink 0 Posted September 20, 2004 Try an init EH with setvelocity [0,0,-0.01] From other experiments, these things will move at the velocity only they are already moving. If it is not moving to start with, then its velocity will remian zero. Of course it might work for this sort of thing, but if it doesn't, this could be why. Yep you are correct there. I'm trying to avoid the bullte method of nudging the barrels as the spurt of dust is well a bit annoying. @Crassus Quote[/b] ]I'm not at your scripting level yet, Col., but does the pallet conform to the terrain because it is damaged or destroyed after being shot? Just normal thing class objects that will react to the enironment after initial movement. Share this post Link to post Share on other sites
mcpxxl 2 Posted September 25, 2004 Any news about it ? Share this post Link to post Share on other sites
colonel_klink 0 Posted September 26, 2004 As this project is becoming a more integrated one with a lot of sfx stuff for buildings and objects, I've decided rather than double post on both this and my own forum, I will only be posting on the DC3D Forum. Needless to say the DIB process is proving to be invaluable for precise placement of objects within addons. By adding detectors and emmitters to common objects these have become highly interactive and responsive to the environment. Precise placement of objects within objects means a large building can be assembled quickly. by adding randomness to the code similar buildings can have a range of furnishings. Anyway, I digress. If you wish to see what is developing please feel free to drop over to DC3D Forums. Share this post Link to post Share on other sites