The download hangar is currently disabled. We're doing our best to bring it back as soon as possible.

Animation - need a helping hand

Discussion, tutorials,hints and tips relating to designing military ai aircraft.
Post Reply
User avatar
gsnde
MAIW Admin
MAIW Admin
Posts: 4381
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Animation - need a helping hand

Post by gsnde »

I am working on the animation of the F-104.

What I like to have:
While the aircraft is parked cold and dark, no pilot is visible and the canopy is closed. During pre-flight check the pilot gets visible and the canopy is open. The aircraft taxis to the runway with open canopy. Then the canopy closes and off it goes.

What I have:
While the aircraft is parked cold and dark, no pilot is visible and the canopy is closed. During pre-flight check the pilot gets visible and the canopy is open. The aircraft taxis to the runway with open canopy. Then the canopy does not close and off it goes.

I fear that might be against some regulations and the pilot will catch a cold :smt001

This is the code I use:

<part>
<name>MIG23_canop</name>
<animation>
<parameter>
<code>
(A:LIGHT NAV, bool) 100 *
</code>
<lag>20</lag>
</parameter>
</animation>
</part>

Is it right that I need to add a "not LIGHT LANDING" condition to get what I want? If so, can somebody please tell me how the syntax for this boolean combine works?
Cheers,
Martin
________________________________________
The Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12131
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Animation - need a helping hand

Post by Firebird »

Well, very simply put Martin you describe 3 possible conditions, closed+no pilot, open+pilot and closed+pilot, but your code only has two possible outcomes, 0*100 or 1*100.

For three stages your animation will need three distinct key frames and then then the code will have to meet the requirements.

I have to ask why you don't split the two up. The pilot appears if the nav light is on, and the canopy is a separate item. The reason I say this is that the obvious code variables that work for taxying out and taking off, don't work easily for landing. The canopy will open after landing while still on the runway. I can provide you with some code to show this problem if you like.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
gsnde
MAIW Admin
MAIW Admin
Posts: 4381
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Animation - need a helping hand

Post by gsnde »

Steve,

Sorry, I was not precise enough when posting. The pilot works perfect and is dealt within another section.

<part>
<name>MIG25_Pilot</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,bool)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>2</maxvalue>
</visible_in_range>
</part>

What I want to have is that the canopy closes before takeoff. If I have understood all this correctly (which might very well not be the case) then it should go like this:

aircraft is not due to start -> canopy closed -> works ok
aircraft gets ready -> canopy open -> triggered by NAV light -> works ok
aircraft taxis to runway -> canopy open -> triggered by NAV light -> works ok

so far everything is like I want it, here comes the issue:

aircraft takes off -> canopy is still open

So I guess I have to add another condition to the one I already have which closes the canopy when takeoff takes place. My thinking is that the landing light would be a candidate (-> NAV light on and not landing light = canopy open, so when the landing light goes on it closes). But while I write this I fear that I need a third condition: while on ground:

canopy open = ('LIGHT NAV = TRUE' AND 'LIGHT LANDING = FALSE' AND 'SIM ON GROUND = TRUE')

1. Does this make sense?
2. How do I phrase the condition?
Cheers,
Martin
________________________________________
The Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference
User avatar
nickblack423
MAIW Veteran
MAIW Veteran
Posts: 2155
Joined: 11 Aug 2006, 21:43
Version: FS9
Location: Ipswich, UK
Contact:

Re: Animation - need a helping hand

Post by nickblack423 »

Martin,

It goes like this:

<part>
<name>anim_canopy_fresh_air</name>
<animation>
<parameter>
<code>
(A:LIGHT NAV, bool)
if{ (A:ENG1 COMBUSTION, bool)
if{ (A:LIGHT STROBE, bool) if{ 0 } els{ 25 } }
els{ 50 }
}
els{ 0 }
</code>
<lag>20</lag>
</parameter>
</animation>
</part>

This will allow that the canopy is closed at keyframe 0, fully open at keyframe 50 and slightly open at keyframe 25. What you need to do is animate it open at 25 as well and you're on a winner.

Nick
"Pain Heals......Chicks Dig Scars.....Glory, Lasts Forever!!!"
Image
Image
User avatar
gsnde
MAIW Admin
MAIW Admin
Posts: 4381
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Animation - need a helping hand

Post by gsnde »

Thank you, Nick - let me play with this a while, I might come back with another question.... OK, here I am :smt002

Can you enlighten me regarding the syntax question? How do I write the three AND conditions together?

('LIGHT NAV = TRUE' AND 'LIGHT LANDING = FALSE' AND 'SIM ON GROUND = TRUE')
Cheers,
Martin
________________________________________
The Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference
User avatar
Weescotty
MAIW Developer
MAIW Developer
Posts: 2770
Joined: 11 Aug 2006, 22:15
Version: FS9
Location: Sydney

Re: Animation - need a helping hand

Post by Weescotty »

Thinking about it you have to use Nicks method of an if / else selection.

If a mod could delete my post above, I would appreciate it. DONE

Kev
User avatar
nickblack423
MAIW Veteran
MAIW Veteran
Posts: 2155
Joined: 11 Aug 2006, 21:43
Version: FS9
Location: Ipswich, UK
Contact:

Re: Animation - need a helping hand

Post by nickblack423 »

yeh, you've got to have a master variable in this case the nav lights. Then it says, if the nav light is on, check to see if the engine in on, if they are both on then check to see if the strobe is on, if its only nav lights then open the canopy all the way (keyframe 50) if its nav lights and engine on then its keyframe 25 and if its all 3 then revert to keyframe 0.

Nick
"Pain Heals......Chicks Dig Scars.....Glory, Lasts Forever!!!"
Image
Image
User avatar
gsnde
MAIW Admin
MAIW Admin
Posts: 4381
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Animation - need a helping hand

Post by gsnde »

After some serios struggling I now use this which is working perfectly:

Code: Select all

        <code>
            (A:SIM on GROUND, bool) 1 ==
            (A:LIGHT LANDING,bool) 0 ==
            and
            (A:LIGHT NAV,bool) 1 ==
            and
             if{ 100 } 
             els{ 0 }
        </code>
Thanks for all the input, guys !
Cheers,
Martin
________________________________________
The Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference
andras1
Second Lieutenant
Second Lieutenant
Posts: 49
Joined: 08 May 2007, 20:37

Re: Animation - need a helping hand

Post by andras1 »

Good morning

I have asked this before but have not gotten much of a response. I am trying to change the rotor animation of a helicopter. I know that it should work using vsiibility. I would like to attach the wisibilty to some engine values. So that the fast rotor shows up once the engine has reached a certain power setting. I have tried to use GENERAL ENG RPM and similar values for this purpose but this seems not to work on ai planes.

Dos anybody have an idea to what one could attach the rotor visibility. BTW does anybody know whether Heli traffic uses the same commands ?

Thanks

Andras
User avatar
Weescotty
MAIW Developer
MAIW Developer
Posts: 2770
Joined: 11 Aug 2006, 22:15
Version: FS9
Location: Sydney

Re: Animation - need a helping hand

Post by Weescotty »

Try -
Use a copy of the prop_blurred, for the prop_slow.
Set the animation speed in the aircraft config, called something like prop_anim_ratio.

Not sure what engine conditions can be used, sorry.
Post Reply