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

Forum Info
Forum Members: 18,581
Total Threads: 8,669
Posts: 94,547

Administrators:
DeeZire, Redemption

There are currently 49 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 10-24-2004, 08:11 PM   #1 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default Problem with code[solved]

Hey, I just added a Overlord style machine gun turret to my Black Eagle tank and it seems to work except for one thing... the turret doesn't turn! now the weapon can still fire in a 360 degree radius, but the turret doesn't turn... which is odd since it's basically a copy and paste job of the overlord gattling cannon... any ideas?
Code:
Object RussiaBlackEagleMGun

  ; *** ART Parameters ***
  SelectPortrait         = SNGatTower_L
  ButtonImage            = SNGatTower
  
  ;UpgradeCameo1 = Upgrade_Nationalism
  ;UpgradeCameo1 = Upgrade_ChinaUraniumShells
  ;UpgradeCameo2 = Upgrade_ChinaNuclearTanks
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = Upgrade_ChinaOverlordGattlingCannon
  
  
  Draw                    = W3DDependencyModelDraw ModuleTag_01
    OkToChangeModelColor  = Yes
    AttachToBoneInContainer = FIREPOINT01

    DefaultConditionState
      Model               = RVBlackEagle_G
      Turret              = TURRET01
      TurretPitch         = TURRET01
      WeaponFireFXBone    = PRIMARY GunMuzzle
    End

    ConditionState        = REALLYDAMAGED 
      Model               = RVBlackEagle_G
      Turret              = TURRET01
      TurretPitch         = TURRET01
      WeaponFireFXBone    = PRIMARY GunMuzzle
    End
  End

  ; ***DESIGN parameters ***
  Side             = Russia
  EditorSorting    = SYSTEM
  TransportSlotCount = 1
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY   HumveeGun 
  End
  
  ArmorSet
    Conditions     = None
    Armor          = InvulnerableAllArmor ; We can't be hurt on the field.  We share damage from the Overlord with his damage module
  End
  VisionRange     = 200

  ; *** AUDIO Parameters ***
  UnitSpecificSounds
    TurretMoveStart = NoSound
    TurretMoveLoop  = NoSound ;TurretMoveLoop
    VoiceRapidFire  = NoSound
  End

  ; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CLICK_THROUGH IGNORED_IN_GUI
    Body            = StructureBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY
      TurretTurnRate      = 60   // turn rate, in degrees per sec
      TurretPitchRate     = 60
      AllowsPitch         = Yes
    End
    AutoAcquireEnemiesWhenIdle = Yes 
  End

  Behavior             = DestroyDie ModuleTag_04
    ;nothing
  End

  Geometry            = BOX
  GeometryMajorRadius = 8.0
  GeometryMinorRadius = 8.0
  GeometryHeight      = 9.0
  GeometryIsSmall     = No      
  Shadow              = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-25-2004, 02:17 AM   #2 (permalink)
Senior Member
 
CommieDog's Avatar
 
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 370
Default

Did you use the W3DOverlordTankDraw module to define the model of the tank to which this turret is attached?
CommieDog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-25-2004, 02:41 PM   #3 (permalink)
Senior Member
 
Join Date: Jun 2004
Location: Earth-ish
Posts: 197
Default

There is suppose to be a bone that is named Turret01 and the engine looks at that bone and makes the object turn at that point only... so make sure that your object has that... because I can see that you made a new object in place of the gattling cannon. Other then that I do not believe there are any problems with it.
Cedar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-25-2004, 08:47 PM   #4 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

there's a problem with it somewhere... the Turret is named TURRET01 just as it should be... I'm sure the problem isn't with the Black Eagle code itself because I replaced the object with the Overlord's gattling cannon... I'm gonna go back over the model to see if I missed somethin there though...
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-26-2004, 05:42 AM   #5 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Try making an invisible bone called TURRETEL01, and attach it to the TURRET01 bone. Then attach all the stuff that was attached to TURRET01 to TURRETEL01 instead. I'm suspecting that the game can't handle using a single bone for both rotation and pitch.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-26-2004, 07:17 PM   #6 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

hmmmm... your probably right immo man... since there's not much else it could be... I'll have to test that out...

EDIT: thanks immo, that was it... why did i even include a pitch factor? it's a .50 cal machine gun :tard:
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2004, 04:16 PM   #7 (permalink)
Senior Member
 
Join Date: Jun 2004
Location: Earth-ish
Posts: 197
Default

You have to make a secondary weapon (make it a dummy weapon like the overlord's or the troopcrawler's) and make the turret be secondary. I think that'll solve it, I'll test it and tell you Monday by 4pm est.
And I'll post the coding for it because I'm getting tired of this post (no offense, but I'm sure you are too) :lol:
Cedar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2004, 09:17 PM   #8 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

nah bro, read my post, it was the fact that i used the same object for both turret rotation and pitch... The dummy weapon has something to do with a problem with targeting... I don't remember exactly... but thanks anyways
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2004, 10:19 PM   #9 (permalink)
Senior Member
 
Join Date: May 2004
Posts: 303
Send a message via MSN to RedLeader
Default

dummy weapon allows u to target the machine gun outside the overlords range...or somethin clost to that...
RedLeader is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 02:54 PM   #10 (permalink)
Senior Member
 
Join Date: Jun 2004
Location: Earth-ish
Posts: 197
Default

I don't think you can have the same bone for Turret and TurretPitch, I think the engine might get confused about that. (as far as I can remember the game has always had a different name for each bone - of the turret and turretpitch)
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
AI script problem, need help!(Solved) homura Generals & Zero Hour Editing 0 06-04-2005 09:31 PM
Tread Problem 8 Treads [SOLVED] thx liger Generals & Zero Hour Editing 19 03-03-2005 02:48 AM
Airfeild Problem[SOLVED] RedLeader Generals & Zero Hour Editing 5 08-21-2004 01:10 AM
Problem with code juanmanuelsanchez Generals & Zero Hour Editing 5 03-01-2004 06:28 PM
Auto-choosing weapons problem (SOLVED) CodeCat Generals & Zero Hour Editing 10 09-16-2003 09:54 AM


All times are GMT -4. The time now is 06:28 PM.


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