|
Author
|
Topic: More questions about Func/Exec
|
charmstar Pilot
|
posted 01-21- 07:17 PM
Hi- I haven't heard any word from MH about whether you can use Exec/Func to activate a DOFOsc command... am I to take it this isn't possible? Also, what properties can you change for other models using these commands? In particular: Can you change the spring strength of another part's DOF using these? For instance, in the WWI planes it would be cool to make getting the struts shot out => less structural integrity => wing more likely to fall off when pull G's. Can you make objects have different amounts of damage? For instance, shoot up the left horiz. stab => the right horiz. stab will be weaker => easier to killAnother question is can you build a conditional statement using Func/Exec in the following manner: If you have A and B attached to root model, with C attatched to both A and B. You want C to fall off only if both A and B fall off of the main model. Could you set up C seperate from A and B (not a child). Then, make a onDetach of A Exec a function in B which just adds another Exec. command within an onDetatch for B. This Exec. would call a Func in C which would obdetatch. Also, you would set the reverse up... the idea being that when A detatches, it unhides a property of B which tells C to detach when B detatches. And if B detatches, it unhides a similar property in A. Is that sort of thing allowed with the Exec/Func pair? charm IP: Logged |
bjorn Pilot
|
posted 01-22- 04:26 AM
I don't think it's possible to activate a function via a DOF, at least not directly. I've been toying with the idea of an indirect way, though. Make the DOF such that when it reaches the endpoint, it causes some invisible object to break. In the "onDetach" section of damage for that object, you have an obExec. I don't know if it'd work, and if it would, it'd still be a one shot thing.Altering DOF characteristics on the fly seems to be impossible, or at least very difficult. The only way I can think of is to actually replace the whole object tree with a damage one, that has other characteristics. Kind of unfortunate. I'd like to have damage DOFs for the gears, that move very slowly, do not lock down and do not move up again, to simulate a hydraulic leak. As for your A-C-B idea, I think it might work. Why not experiment with it? You might have to have several different objects, an A, A-with-no-B, B, B-with-no-A, and C. When A detaches, you replace B for B-with-no-A, and vice versa. The big question is what'd be the parent of C? The same as the parent for A and B? _ /Bjorn.
IP: Logged |
Sv Pilot
|
posted 01-22- 08:01 AM
Hey charm,You can use Exec/Func to activate a DOFOsc command as far as I know... But the answer to your second question is "yes and no" kinda I think. Exec sends prop lists to other parts. Functions are like custom events. So we have onDmg, right? Well now you can create onWingDetach on an object other than the wing. I used this to implement this on my SE5a: when either wing detaches, the wing strut detaches. This dividing line of what you can and can't do seems to be compile time vs. flytime. Some things would need to be set up at the start of the mission, and others are dynamic. For example, smoke trails can be attached to any part at any time. DOF springs I would guess can only be set up at the beggining of the mission when the plane is built. Is this the case? You can't send a DOF prop list to a part dynamicaly can you? If this is the case, where some things are compile time and some things are flytime, could we get a breakdown of what properties are what? Or am I thinking about this the wrong way? ------------------ -Sv =FC= WWI in SDOE! IP: Logged |
Michael Harrison General
|
posted 01-22- 10:07 AM
to be honest, I was waiting to see what the other OpenPlane monkeys would come up with.The Func/Exec code wasn't designed to activate DOFosc's but that doesn't really mean that you can't do it (other people have twisted OpenPlane to do many things that we didn't originally envision). One thing to keep in mind is that the command for a DOFosc is passed to the root object (generally an airplane). With that in mind, you could theoretically build up a command property list that is passed to the root object when a Func is executed. IP: Logged |
Pete Hawk Pilot
|
posted 01-22- 11:36 AM
That's cool Michael! Maybe my old V-2 rocket will be launchable afterall  IP: Logged | |