|
Author
|
Topic: Deactivating/Activating Airfoils With A Key Press?
|
ArgonV Pilot
|
posted 10-10- 10:37 PM
Ok, I know this has ben brought up before, but I ask is there a solution? Has anyone found one? Also, has anyone found a way to make parts dissapear and reappear on a key press? And a way to disable parts as well?(If not, I found a perfect solution to all of these things) But then agian, this could all be old news to some. IP: Logged |
wakeup tailgunner Pilot
|
posted 10-11- 03:39 AM
i can make whole files disappear with a key press.....
IP: Logged |
ArgonV Pilot
|
posted 10-11- 06:37 AM
Hmmm... the delete key? But that doesnt work in SDOE.  IP: Logged |
Whirlwind Pilot
|
posted 10-11- 08:18 AM
I know if you check out the bomb's 'funcWonderTwinPowers you can see airfoils being activated through a function. As for deactivating.....IP: Logged |
Raider Pilot
|
posted 10-11- 09:25 AM
The landing gear hide and unhide as well as have an airfoil that is activated and deactivated by using obEndHidden and obEndDisabled in the DOF.  IP: Logged |
wakeup tailgunner Pilot
|
posted 10-11- 09:40 AM
Can obModel work for this? As aprt of a function, you could obModel in a model with an attached airfoil in place of one without. Don't know if the reverse can be done. I don't know where the old part goes when you obModel. If it is discarded, that won't work more than once!IP: Logged |
ArgonV Pilot
|
posted 10-11- 11:48 AM
Raider, thats what Im talking about buddy! Only it doesnt always have to be obEndHidden or obEndDisabled. It can be obBeginHidden or obBeginDisabled as well. That way, when you enter the game, that particular object/airfoil is already disabled and/or hidden and you dont have to press a key to disable it. Just press a key to enable it.A note: For an object to start disabled, it has to be hidden at first as well. Last night, I wanted the hooks that keep the prop from being bent on the F4u to be disabled at start so you could still nose over with out the hook breaking your fall. This is how I achieved it. IP: Logged |
bjorn Pilot
|
posted 10-11- 12:51 PM
Argon,Right, but I don't think you can have an airfoil begin as hidden/deactivated (I've tried and failed, but it might be me.) The landing gear can, yes, but SDOE knows what the gear is and gives it special treatment (in fact, if you overload SDOE enormously by starting a bazillion aircraft in the air, you'll notice a short glimpse of them all with the gear down, just before the action begins.) _ /Bjorn. IP: Logged |
Whirlwind Pilot
|
posted 10-11- 12:56 PM
All this time I though the gear had a flap like property to it that when raised, raised the flap like airfoil. That does explain a lot.IP: Logged |
ArgonV Pilot
|
posted 10-11- 01:37 PM
bjorn, what did you try it on?True SDOE know what the wheels are but not the whole gear strut part. There is no special DOF function that only the gear struts and all their child objects can use. Its just a matter of typing the correct things in. I have noticed that SDOE starts with the gear down at first and then they dissapear soon afterwards. But all that has to do with is the DOF macro and the fact that there are wheels attached to it. This is the DOF macro that I use for the NoseHook on the F4u. (dofID 'NoseHook dofOsc (oscName 'NoseHook oscRuntime 2 oscParent 'f4u oscCmd 'cmdHookToggle 'cmdRunReverse 'cmdHookUp 'cmdRunForward 'cmdHookDown 'cmdRunBackward oscBeginHidden 'NoseHook oscBeginDisabled 'NoseHook) It starts the hook disabled and hidden. How do I know its disabled? Because it clips thru the carrier deck when I do a nose over and my prop gets bent. How do I know when its not disabled? Because the plane wont nose over due to the obBodyPoints on the hook that is now enabled. What does this tell me in the scheme of things? That when an object is disabled, its properties and the properties of its child objects are also disabled... which means that airfoils can be disabled as well! If it works with obBodyPoints, why wouldnt it work with airfoil properties? If anyone knows for a fact that I am wrong (MH) please correct me and shed some light onto this.  [This message has been edited by ArgonV (edited 10-11-2000).] IP: Logged |
bjorn Pilot
|
posted 10-11- 04:57 PM
Argon,When experimenting with the canopy flying off of the P47, I added a child to the canopy with a drag airfoil. I gave the canopy sliding DOF the property of disabling the drag child when closed. Unfortunately, the canopy insisted on being ripped off when starting in the air, unless I started at slow speed, opened the canopy and closed it again. From this I conclude that the dofBeginDisabled doesn't really work from the start, the DOF has to be "opened" and then "closed" again for the disabling to be activated. I may have done something wrong, though, that's for sure. _ /Bjorn. IP: Logged |
ArgonV Pilot
|
posted 10-11- 05:46 PM
bjorn, I already see the error of your ways. For oscBeginDisabled to work from the start, you have to have oscBeginHidden as well. Dont ask me why, but that is what I have discovered.[This message has been edited by ArgonV (edited 10-11-2000).] IP: Logged |
wakeup tailgunner Pilot
|
posted 10-12- 04:18 AM
If what Argon is looking at here works, the world of damage modelling for control surfaces just got a whole lot simpler!You should be able to model jamming flaps and ailerons, and change airfoils without mucking around with part swapping! Oh I hope this works! IP: Logged |
ArgonV Pilot
|
posted 10-12- 06:47 AM
It SHOULD work! If it worked for the DOF system I use for deactivating the hooks so you can nose over (Deactivating the hooks causes the obBodyPoints to deactivate as well) then I see no reason why it wont work for airfoils.Oh I just looked thru the OP documentation that came with the FS:SDOE CD. Look what I found that it says.... oscBeginHidden ‘child Specifies a child object that should be hidden when the macro is at time 0. oscEndHidden ‘child Specifies a child object that should be hidden when the macro is at the end time. oscBeginDisabled ‘child Specifies a child object tree that should be disabled when the macro is at time 0. All objects at or beneath ‘child will be disabled. Disabled objects no longer perform their runtime behaviors (airfoils stop working, tires don’t roll, etc.) oscEndDisabled ‘child Specifies a child object tree that should be disabled when the macro is at the end time. [This message has been edited by ArgonV (edited 10-12-2000).] IP: Logged |
wakeup tailgunner Pilot
|
posted 10-12- 07:40 AM
Is this right....If you had a seperate undercarriage leg, which began hidden and disabled, any airfoil attached to it would have no effect. If, on damage to the parent, you activated a dof that dropped it into the airstream it would have an effect. The old undercarriage having been detached. If the dof that lowers the gear is not tied to the undercarriage toggle command, you have modelled hydraulic failure! You could have dof driven airfoils activating when a wing was hit to simulate the drag of ruptured panels. As long as your airfoil is attached to a dof driven object that begins hidden and disabled the flight model is unaffected until you want it to be! IP: Logged |
ArgonV Pilot
|
posted 10-12- 12:56 PM
Wakeup, I believe that sounds correct! The airfoil object would have to be hidden and disabled using the DOF syntax.The second part sounds fesable as well! I will try this. I will attach an airfoil object to a plane that will cause a considerable amount of air resistance when I hit the key. If it works, then modeling drag in this way will surely work!  IP: Logged |
ArgonV Pilot
|
posted 10-12- 04:00 PM
Ok, I had this working. (Long process, dont ask now...) BUT it had to have the cmdGearToggle command to work!!!!! I DONT KNOW WHY!!!!!!! As soon as I changed cmdGearToggle to something else, it stoped working!!!!!!!  I'll continue to work on this. Im sooo close. WHY DID IT HAVE TO HAVE cmdGearToggle TO WORK!?!?!?! SOMEONE TELL ME!!!! [This message has been edited by ArgonV (edited 10-12-2000).] IP: Logged |
ArgonV Pilot
|
posted 10-12- 05:08 PM
IT WORKS!! I GOT IT WORKING!! IT ACTUALLY WORKS!! I GOT AN AIRFOIL TO ACTIVATE AND DEACTIVATE WITH A KEY PRESS!! IN YOUR FACE OPEN PLANE!!  Ok it was a HUGE trial and error process, and its a wee bit more complicated than I thought (I dont even exactly know why it works, but it does so why question it?) I THINK that the 2 DOFs I use cancel each other out and thus the airfoil starts deactivated. The airfoil deactivator is composed of three parts. A parent part with a DOF, the airfoil without a DOF and a copy of the parent part as a child of the airfoil with a DOF. Now I have no idea how to call these DOFs with a function. I'll work on that after my brain sizzles down. I need a break after this. [This message has been edited by ArgonV (edited 10-12-2000).] IP: Logged |
wakeup tailgunner Pilot
|
posted 10-12- 05:35 PM
For damage modelling, calling the function should be easy. obProb, obExec etc. are used with damage no probs. The tricky bit is calling a function from anywhere else!I have been looking at ways of doing this to make engines smoke on startup. I had some problems with the method used on the p47, since the dof didn't want to break for me! Don't know if this was an error on my part, or some problem with the method as a whole. I want to call a function when you hit the 'E' key. IP: Logged |
bjorn Pilot
|
posted 10-12- 06:21 PM
Argon,Sure you don't have any cmdGear stuff in there still? If you do, I know why it works. As I mentioned earlier, the gear is actually lowered on startup, even if you start in the air. You can see this for a short moment at the startup if SDOE is severely overloaded. The reason it works is that the gear starts down, and the DOF is run backwards before the real action begins. _ /Bjorn. IP: Logged |
ArgonV Pilot
|
posted 10-12- 06:24 PM
Bjorn, just checked... I dont have any refrences to cmdGearToggles or anything with the word Gear in it. I even copied it to another plane and it worked there too!P.S. Bjorn, mail me, and I'll mail you the A6M5.sm file where I have achieved this. [This message has been edited by ArgonV (edited 10-13-2000).] IP: Logged |
ArgonV Pilot
|
posted 10-13- 12:42 AM
Ok, I just activated an airfoil with a function when the wingtip of the A6M5 reaches damage level 1! We can now make our planes sluggish when they get shot!  IP: Logged |
bjorn Pilot
|
posted 10-13- 10:46 AM
Argon,Had I known this was what you wanted to achieve, I could've given you some advice. It can be done in a much simpler way, no need to involve DOFs. Here's the recipie. Add an object, just like the one you have, but only one object and no DOFs. If you use bullet sprays for your parts, one of the bullet "holes" may be a perfect object to use. Give it the "obProto CAirfoil" property as the first item in the property list, but don't fill in any other airfoil properties. Add a function that does fill in which airfoil, the area, etc. Call the function on damage. It works like a charm! _ /Bjorn. IP: Logged |
ArgonV Pilot
|
posted 10-13- 11:35 AM
bjorn, I neer thought of that! Thanks! (Although it SHOULD of came to me. Thats similar to how bomb airfoils activate) That is alot simpler. Im still glad that it works with using my DOF system aswell.Still, the activating airfoils on a key press (and deactivating them) has many many uses other than damage. P.S. Could we use the airfoil activation method for WEP? [This message has been edited by ArgonV (edited 10-13-2000).] IP: Logged |
Jerry Pilot
|
posted 10-13- 02:29 PM
Could this be used to activate an airfoil when the canopy is opened in flight to create extra drag, and then deactivate it when the canopy is closed? Can it be linked to sound, so the wind and engine noise is louder when the canopy is opened? IP: Logged |
ArgonV Pilot
|
posted 10-13- 03:15 PM
Jerry,It sure can be used to activate/deactivate extra drag when a canopy opens/closes! As for sounds... how does an object trigger a sound? I know there is an obSoundRoot property, but that just tells where the sounds are located for that object. It doesnt tell the object to trigger the sound. [This message has been edited by ArgonV (edited 10-13-2000).] IP: Logged |
bjorn Pilot
|
posted 10-13- 03:27 PM
Jerry, right on the head of the nail. Argon's method is perfect for just this kind of thing. Sound probably won't work, but the behaviour will, I'm absolutely sure of that. _ /Bjorn.IP: Logged |
Raider Pilot
|
posted 10-13- 04:57 PM
LMAO, bjorn, didn't you already do this. You added a drag object to the canopy, and when you activate the Open Canopy dof it would activate the airfoil for the drag object, which would detach and then call a function to detach the canopy. Like on the Jug.  IP: Logged |
ArgonV Pilot
|
posted 10-13- 05:07 PM
Raider, bjorns drag/breaking DOF method does not cause a considerable amount of drag. Just enough so the DOF breaks after a certain speed. I thing Jerry wants drag to be caused by the opening canopy that will affect the FM slightly.IP: Logged |
Jerry Pilot
|
posted 10-13- 06:11 PM
ArgonV, yes. I don't know to what extent but the FM change should be noticible.I love the scenes in movies where the pilot is flying with the canopy open, sees an EA and then closes his canopy to go into action. Kinda like the cowboy strapping on his guns before a gunfight.  Too bad we can't link the opening/closing of the canopy to some separate .wav files to get a louder engine/wind sound when the canopy is open. I didn't mean to imply that your DOF technique would do it, just some way at all. [This message has been edited by Jerry (edited 10-13-2000).] IP: Logged |
Jaguar Pilot
|
posted 10-13- 06:17 PM
Well, now that we got this whole changing an airfoil with a key press down.... Is it possible to change fuel tanks with a key press? I have been trying to get drop tanks in this game since day one, and this is the ONLY thing stopping me  Awsome work guys! Keep it up. IP: Logged |
ArgonV Pilot
|
posted 10-13- 09:17 PM
Jaguar.... hmmm.... maybe that will be my next project?IP: Logged |