Page 1 of 1
Remove rotors from helicopter?
Posted: 23 Feb 2013 14:53
by AndyLandy
Hello,
I've created a GRF file with some helicopters in, but I'd like to make one a VTOL without any rotor blades. Is there a simple way of disabling the addition of rotor blades to a chopper? I've had a look through the documentation for Action3 and it says it's possible, but I couldn't find any examples.
As ever, all advice gratefully received!
Re: Remove rotors from helicopter?
Posted: 23 Feb 2013 16:21
by Transportman
Doesn't it work when you provide a sprite with only transparent blue?
Re: Remove rotors from helicopter?
Posted: 23 Feb 2013 16:40
by mart3p
Transportman wrote:Doesn't it work when you provide a sprite with only transparent blue?
You do have to provide a transparent blue sprite but you also need an action 3 livery override to set that as the rotor sprite. The livery override must immediately follow the helicopter's action 3.
Something like this...
Code: Select all
//Graphics for vehicle
0 * 0 03 03 01 // n-id
26 // vehicle ID
00
02 00 // sprites for helicopter
//Rotor override
0 * 0 03 03 81 // n-id - note, bit 7 set
26 // vehicle ID
00
03 00 // sprites for rotor
Re: Remove rotors from helicopter?
Posted: 23 Feb 2013 17:40
by michael blunck
mart3p wrote:
[...]you also need an action 3 livery override to set that as the rotor sprite. The livery override must immediately follow the helicopter's action 3.
IIRC, this is an obsolete restriction which had been lifted as early as 2.0.1 alpha 41 (TTDPatch, that is).
regards
Michael
Re: Remove rotors from helicopter?
Posted: 23 Feb 2013 17:57
by mart3p
michael blunck wrote:IIRC, this is an obsolete restriction which had been lifted as early as 2.0.1 alpha 41 (TTDPatch, that is).
Yes, it's a very long time since I studied the OpenTTD
helicopter rotor code.

Re: Remove rotors from helicopter?
Posted: 23 Feb 2013 21:02
by AndyLandy
OK, got it working, thanks!
Took me a while to get my head round Action2/Action3 interactions, particularly since I'm using an Action2 callback to add some text into the purchase vehicle dialog. Forgot that it still needs its own unique set-id, which I was overwriting with the new rotors. Oops.
For the "invisible" sprites, I simply copied the original sprites and blanked them out as entirely blue. Do I need four blue sprites, or can (and should) I just use a single blue sprite for all variations on a rotor? (On the other hand, it makes it nice and easy if I want to add some custom rotor designs later!)
Anyways, thanks again for all your help and input so far.

Re: Remove rotors from helicopter?
Posted: 23 Feb 2013 21:36
by Transportman
You can use one single sprite.
Re: Remove rotors from helicopter?
Posted: 23 Feb 2013 21:53
by michael blunck
Transportman wrote:You can use one single sprite.
A single blue pixel would be sufficient.
regards
Michael