Jump to content
Official BF Editor Forums

When Heli Blades Touch Something..


Lauryxy
 Share

Recommended Posts

I know i have asked this before in another topic but nobody has answered so i'll ask again: Is it possible to make heli go to a tailspin when its blades touch anything or get damaged in any way?

My original plan was to give ah1z main rotor and tail rotor their own armor comps and then add three motors: one to lift the heli, second one that would push the heli into a spin if main rotor is destroyed, and the last one to counteract the second one when the main rotor is ok. So as you might have guessed the first and third ones i would attach to main rotor and the second i would attach to tail rotor. This way when the main rotor gets damaged enough then there would be nothing to counteract the tailrotor and the heli would spin.

The problem with my idea is that i don't know what codes do i need to create an motor.

Edited by Lauryxy
Link to comment
Share on other sites

Yep, you would have to find a way to destroy (=remove) the rotor + engine from the heli.

Since BF2 redirects all damage to the parent (in opposition to bf2142), you can not make this child lose HP on impact.

I was thinking of adding force objects instead of engines, but for that you need the rotor gone. ;)

Link to comment
Share on other sites

Yep, you would have to find a way to destroy (=remove) the rotor + engine from the heli.

I think you can do this by creating a destroyable object and add engine as a child to it. It would be nice to destroy the motor and make the heli fall...

Link to comment
Share on other sites

I think the best solution would be to add an armoreffect which has a ForceObject attached to it (what BEEX said :P ). I'm currently not *really* sure if it will work but its worth a try. Unfortunately i can't test it here until we have a heli in our mod :P

Edited by mschoeldgen[Xww2]
Link to comment
Share on other sites

' date='14 April 2011 - 07:39 AM' timestamp='1302766747' post='103610']

I think the best solution would be to add an armoreffect which has a ForceObject attached to it (what BEEX said :P ). I'm currently not *really* sure if it will work but its worth a try. Unfortunately i can't test it here until we have a heli in our mod :P

Yes i've already done that but how to separate blade and hull damage is the Q now.

And my other Q still remains - How to create a motor/engine whatever you call the thing that makes helis lift off the ground and planes move?

Edited by Lauryxy
Link to comment
Share on other sites

as weve said already you cant seperate hull and rotor damage,its all one object.

.

what type of engine?...roll engine,pitch engine,yaw engine,forward thrust engine or helicopter engine?

.

it best if you take a good look at the air_f-35b.tweak to see how various types of engines can be templated onto an air vehicle.

Link to comment
Share on other sites

Yeah, thats why we suggest ForcObjects but for unknown reasons he insists on creating an engine :P

@Lauryxy: Examine the parachute code in /objects_server.zip/vehicles/air/parachute/parachute.tweak .Its one of the few ( maybe the only one ? ) objects in BF2 which uses ForceObjects.

Edited by mschoeldgen[Xww2]
Link to comment
Share on other sites

If I can't separate hull dmg from blade dmg then it's case closed unless you have any other ideas. I already have tailspin if hull is damaged enough(thank you, PR) but no tailspin when blades hit stuff.

Link to comment
Share on other sites

  • 4 weeks later...

I don't think you guys are right about parents inheriting damage from children with armor comps. Yes, weird stuff happens when the children are destroyed, but that can be avoided by not letting them be destroyed. I think this could work with a little python: First create a col mesh dummy for the rotor with an armor comp and a whole bunch of armor (like 999999999). Then use a timer that triggers a function every few seconds or so. Make the function check if the rotor col mesh object was damaged at all and if so adjust the heli's engine with some host.rconinvoke commands. The rotor would still be visible, but you might be able to stop it from spinning by adjusting the engine. Alternatively, you might be able to holdObject the rotor col onto the chopper, but that has it's own problems. I think this would work; I'll try it out when I'm at a computer with BF2.

I don't remember exactly what happens when you destroy a child, but I remember falling through the ground when I exited the vehicle. And I think when I went back to the vehicle it was displaying the interior in 3P, but when I got back in it, everything went back to normal. On an SP game I was able to use damage state effects as damage indicators, but they don't show up over the network, not to mention they will easily take you over the effect limit (or at least that was the case when I played against the ai in my modified car).

Edited by Chael
Link to comment
Share on other sites

  • 3 weeks later...

unfortunately i don't do python so I can't try your idea.

As much as I remember destroyng a child turned the copter into a wreck, killed everyone inside and acted like a heli deserted midair.

Link to comment
Share on other sites

Yes, the standard behaviour for a Bundle ( and in this context a PCO is simply an advanced form of a Bundle) in BF2 is to wreck once one of its children is wrecked. This excludes EffectBundle children so one solution would be to pack your destroyable child into an EffectBundle.

Note that BF2142 differs here. Children in BF2142 do not necessarily kill their parent.

Edited by mschoeldgen[Xww2]
Link to comment
Share on other sites

  • 2 months later...

Last year i made a RAH-66 comanche, i've done this, you still take damage but you spin a little when it hits somthin (Also cuts up soliders too)

make the blade a RotationalBundle in the prime model when you build a new Chopper and code it so the prop starts of slow and build up it's the same a codding a hud (Trile and Error).

Link to comment
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...
 Share

×
×
  • Create New...