Page 1 of 1

Troubles programming new helicopters/rotors

Posted: 10 Aug 2004 20:57
by krtaylor
The Planeset is finally attempting to make new helicopters. The part of the Patch that allows fiddling with helicopters appears to be probably the oldest Patch work that's never been used. I remember hearing that you could now turn on and off the rotor of a helicopter, and specify different sprites to be used for a helicopters rotor (e.g. for a twin-rotor helicopter.) But this doesn't seem to be documented. Can you advise us on how to do this properly? Currently we have four issues:

1. X-Y positioning of the rotors in various views. The rotor isn't supposed to always be dead center of the sprite, in all angles.

2. Alternate rotor sprites for the twin-rotored craft. These would need a different view for each angle, as the orientation of the rotors are different.

3. Alternate rotor sprites depending on action variables. For the Osprey, in level flight, the rotors are like a plane's, but in takeoff and landing, they are like a helicopters.

4. Stop sprites, to show the rotors at rest when the helicopter is at the gate. We may want to do the same thing with fixed-wing propeller aircraft also.

Posted: 10 Aug 2004 22:09
by Patchman
I thought it's documented... but it's easy, all you do is a livery override for the helicopter. There's a sample .grf file on the patch site that shows how this works.

You can't reposition the rotor as such, you can only offset it with the .grf x/y offsets, or by simply drawing it off the centre.

Since the helicopter graphics are like regular vehicle graphics, you can make full use of variational action 2 to show them differently as needed.

Posted: 10 Aug 2004 22:11
by krtaylor
Yes, but can you also change the ROTOR sprite that way? That appears to be the worst sticking point. We were able to change the appearance of the body of the helicopter itself, we are having more problems with the rotors.

Posted: 10 Aug 2004 22:16
by Patchman
That's what my reply was about, yes.

Posted: 10 Aug 2004 22:28
by krtaylor
Hmm. OK, I will see what happens. Either way, we'll be testing the limits of your helicopter code... finally.... :lol: