logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,642
Total Threads: 8,744
Posts: 95,512

Administrators:
DeeZire, Redemption

There are currently 21 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 11-21-2004, 11:09 AM   #1 (permalink)
Senior Member
 
Join Date: Sep 2003
Posts: 168
Default Animating Diving Strafing Aircraft

I'm working on having aircraft use animations to dive and shoot at aircraft on the ground.

Right now, using the following code, the aircraft diving animation plays as soon as you target the enemy instead of when you reach the enemy. What do I have to change to fix it?

In addition, I need the animation only to play for the SECONDARY weapon. How do I do this? (I know it must be possible because Rangers play different animations depending on the weapon they use).

Code:
  Draw                   = W3DModelDraw ModuleTag_01
 
    DefaultConditionState
      Model               =  RVXWing_closed
      HideSubObject       = BurnerFX01 BurnerFX02 BurnerFx03 BurnerFx04
      WeaponLaunchBone = PRIMARY WEAPONA
      TransitionKey = TRANS_Normal 
    End

    TransitionState = TRANS_Attacking TRANS_Normal
      Model               =  RVXWing_opening
      Animation         = RVXWing_opening.RVXWing_opening
      AnimationMode = Once_Backwards
      HideSubObject       = BurnerFX01 BurnerFX02 BurnerFx03 BurnerFx04
      WeaponLaunchBone = PRIMARY WEAPONA
    End

    TransitionState        = TRANS_Normal TRANS_Attacking
      Model               =  RVXWing_opening
      Animation         = RVXWing_opening.RVXWing_opening
      AnimationMode = Once
      ShowSubObject       = BurnerFX01 BurnerFX02 BurnerFX03 BurnerFX04
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ParticleSysBone     = Wingtip03 JetContrail
      ParticleSysBone     = Wingtip04 JetContrail
      WeaponLaunchBone = PRIMARY WEAPONA
      WeaponFireFXBone  = PRIMARY WEAPONA
    End

    ConditionState        = ATTACKING
      Model               =  RVXWing_open
      ShowSubObject       = BurnerFX01 BurnerFX02 BurnerFX03 BurnerFX04
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ParticleSysBone     = Wingtip03 JetContrail
      ParticleSysBone     = Wingtip04 JetContrail
      WeaponLaunchBone = PRIMARY WEAPONA
      WeaponFireFXBone  = PRIMARY WEAPONA
      TransitionKey = TRANS_Attacking 
    End
That was only a cut out from the code.

Thanks in advance.
NEONecd888 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-21-2004, 06:18 PM   #2 (permalink)
Senior Member
 
Join Date: Jul 2004
Location: London, UK
Posts: 376
Send a message via MSN to AntiSocialKindaGuy
Default

Quote:
Right now, using the following code, the aircraft diving animation plays as soon as you target the enemy instead of when you reach the enemy. What do I have to change to fix it?
As far as I'm aware, you can't. I've got the same thing, only I used the Aurora logic; when an enemy is selected, the units locomotor changes so the preferred height is reduced (saves needing to make a new anim - although looking at the code it looks like your X-Wing opens out too, so thats no use).

I suppose you could combine it with deploying logic, where the unit "deploying" is a diving anim.

If you get it working, I'd be interested to hear, as I'd like the same thing
AntiSocialKindaGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-21-2004, 07:16 PM   #3 (permalink)
Senior Member
 
Join Date: Sep 2003
Posts: 168
Default

That sounds like a neat way of doing it, but then it would dive even if it were targetting an aircraft.
NEONecd888 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-21-2004, 08:23 PM   #4 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 853
Send a message via AIM to mastermind2003 Send a message via MSN to mastermind2003
Default

Try attaching that anim to when it's actually using the weapon. I believe that would be more like what you want. It would be FIRING_WEAPON_A or something similar.
mastermind2003 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-21-2004, 10:19 PM   #5 (permalink)
Senior Member
 
Join Date: Sep 2003
Posts: 168
Default

I tried FIRING_WEAPON_A, and the result was that the animation didn't play at all.
NEONecd888 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-23-2004, 04:56 PM   #6 (permalink)
Senior Member
 
Join Date: Jun 2004
Location: Earth-ish
Posts: 197
Default

If you give it 2 weapons make sure it doesn't have to return to base to re-arm, because it will act stupid until it is empty - you'll have to tell it to re-arm.
As for animations, make a module pre-attack or something like that and just make it not have any animation, then give it a firing_primary or firing_weapon_A or something like that for that actual attacking animations and that should work - or just give it attacking animations period - but I think you need the pre-attack module.
Cedar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-24-2004, 06:12 PM   #7 (permalink)
Senior Member
 
Join Date: Sep 2003
Posts: 168
Default

Okay I changed the conditionstate "ATTACKING" to "USING_WEAPON_A". Here's the code.

Code:
;------------------------------------------------------------------------------
Object RebelsAirXwing

  ; *** ART Parameters ***
  SelectPortrait         = RAXwing_L
  ButtonImage            = RAXwing
  
  UpgradeCameo1 = Upgrade_RebelsProtonTorpedoes
  
  Draw                   = W3DModelDraw ModuleTag_01
 
    DefaultConditionState
      Model               =  RVXWing_closed
      HideSubObject       = BurnerFX01 BurnerFX02 BurnerFx03 BurnerFx04
      WeaponLaunchBone = PRIMARY WEAPONA
      TransitionKey = TRANS_Normal 
    End

    TransitionState = TRANS_Attacking TRANS_Normal
      Model               =  RVXWing_opening
      Animation         = RVXWing_opening.RVXWing_opening
      AnimationMode = Once_Backwards
      HideSubObject       = BurnerFX01 BurnerFX02 BurnerFx03 BurnerFx04
      WeaponLaunchBone = PRIMARY WEAPONA
    End

    TransitionState        = TRANS_Normal TRANS_Attacking
      Model               =  RVXWing_opening
      Animation         = RVXWing_opening.RVXWing_opening
      AnimationMode = Once
      ShowSubObject       = BurnerFX01 BurnerFX02 BurnerFX03 BurnerFX04
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ParticleSysBone     = Wingtip03 JetContrail
      ParticleSysBone     = Wingtip04 JetContrail
      WeaponLaunchBone = PRIMARY WEAPONA
      WeaponFireFXBone  = PRIMARY WEAPONA
    End

    ConditionState        = USING_WEAPON_A
      Model               =  RVXWing_open
      ShowSubObject       = BurnerFX01 BurnerFX02 BurnerFX03 BurnerFX04
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ParticleSysBone     = Wingtip03 JetContrail
      ParticleSysBone     = Wingtip04 JetContrail
      WeaponLaunchBone = PRIMARY WEAPONA
      WeaponFireFXBone  = PRIMARY WEAPONA
      TransitionKey = TRANS_Attacking 
    End

    ConditionState        = JETEXHAUST
      Model               =  RVXWing_closed
      ShowSubObject       = BurnerFX01 BurnerFX02 BurnerFX03 BurnerFX04
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ParticleSysBone     = Wingtip03 JetContrail
      ParticleSysBone     = Wingtip04 JetContrail
      WeaponLaunchBone = PRIMARY WEAPONA
      WeaponFireFXBone  = PRIMARY WEAPONA
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      Model               =  RVXWing_closed
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ParticleSysBone     = Wingtip03 JetContrail
      ParticleSysBone     = Wingtip04 JetContrail
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02 BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
      ParticleSysBone     = Engine03 JetLenzflare
      ParticleSysBone     = Engine04 JetLenzflare
      WeaponLaunchBone = PRIMARY WEAPONA
      WeaponFireFXBone  = PRIMARY WEAPONA
    End

    OkToChangeModelColor = Yes

  End
The result was that the X-wing did not play any of the animations when it was already in the air and I targeted a unit, but the animation played if I told it to attack a unit when it was already on the airfield, and it would have to take off... then it performed the diving animation at the right time-- problem is that the playing backwards of that animation to go back to the normal stance did not seem to occur and so it was very abrupt.

Could I use a "Wait Until Transition State finished thing" to fix it perhaps?
And why is the animation only playing when you designate a target while it's on the field?

Plus I heard that Blitz2 has controllable diving aircraft (not just generals abilities ones)-- is this true?

Thanks.
NEONecd888 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-24-2004, 07:00 PM   #8 (permalink)
Senior Member
 
Join Date: Jul 2004
Location: London, UK
Posts: 376
Send a message via MSN to AntiSocialKindaGuy
Default

I have a related problem with a unit; the deploying animation plays when the unit is stationary when an enemy is targetted, but not when it is moving and an enemy is targetted. Could be the same problem.
AntiSocialKindaGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-24-2004, 07:08 PM   #9 (permalink)
Senior Member
 
Join Date: Sep 2003
Posts: 168
Default

yeah-- i got it to work by bringing in the JETEXHAUST thing so that the animation plays both in the air and when on the airfield, but it still sometimes flickers the animations if it can't destroy the unit in one run...
NEONecd888 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-29-2004, 02:44 PM   #10 (permalink)
Senior Member
 
Join Date: Jun 2004
Location: Earth-ish
Posts: 197
Default

Well also make it have a pre-attack delay (for the animation to complete) and you could try making the diving animation be the pre-attack and the lifting animation be the actual animation for the attack.
Also "VERY IMPORTANT" you must make identical conditionState changes in the unit if you have the WeaponSetUpgrade actually make something appear.
Another stab in the dark is that you could shorten the attack range and that might force the unit to dive in order to fire... or it'll just keep flying in circles. but it's worth a try right?
Cedar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strafing Planes and Projectiles AntiSocialKindaGuy Generals & Zero Hour Editing 0 03-15-2005 11:02 AM
Strafing Run on Helicopter coolfile Generals & Zero Hour Editing 3 02-20-2005 06:30 AM
the strafing run thing DeathAngel Generals & Zero Hour Editing 15 02-16-2004 12:40 PM
Strafing runs CodeCat Generals & Zero Hour Editing 12 12-04-2003 10:29 AM
jet strafing Mandalorain Generals & Zero Hour Editing 2 09-01-2003 10:47 PM


All times are GMT -4. The time now is 03:44 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.