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

Forum Info
Forum Members: 18,677
Total Threads: 8,796
Posts: 95,827

Administrators:
DeeZire, Redemption

There are currently 33 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 12-31-2003, 08:10 PM   #1 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 306
Send a message via AIM to Vger Send a message via MSN to Vger Send a message via Yahoo to Vger
Default problem with dual laser tank

I started using gmax a couple of months ago and I have been doing different things with it, so I decided to make a dual laser tank for the laser general and well it is now in zero hour, but the dual lasers do not come out of where they are supposed to. The lasers end up coming from the middle of the model or only one of the barels, depending on how I code it. I can not get the lasers to come out of their respectible barels.
Please help.

The code for the lasers:

;------------------------------------------------------------------------------
Weapon Lazr_CrusaderTankGunAdv
PrimaryDamage = 80.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 150.0
MinTargetPitch = -15 ; we may not target anything outside of this pitch range
MaxTargetPitch = 15 ; ditto
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 99999 ; dist/sec
WeaponRecoil = 5 ; angle to deflect the model when firing
LaserName = Lazr_CrusaderLaserBeam
LaserBoneName = TurretMS01 ;TurretMS02
LaserBoneName = TurretMS02
FireFX = Lazr_WeaponFX_LaserCrusader
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 500 ; time between shots, msec
ShotsPerBarrel = 1
ClipSize = 2 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 1000 ; how long to reload a Clip, msec
ProjectileCollidesWith = STRUCTURES WALLS

DelayBetweenShots = 2000 ; time between shots, msec
End

Some code for tank:

Draw = W3DTankDraw ModuleTag_01
DefaultConditionState
Model = AVLaserTnkAdv
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS01
WeaponRecoilBone = PRIMARY Barrel
WeaponLaunchBone = PRIMARY TurretMS01
WeaponFireFXBone = PRIMARY TurretMS02
WeaponLaunchBone = PRIMARY TurretMS02
WeaponFireFXBone = SECONDARY TurretFX03
WeaponLaunchBone = SECONDARY TurretFX03
End
ConditionState = REALLYDAMAGED
Model = AVLaserTnkAdv_D
End
ConditionState = RUBBLE
Model = AVLaserTnkAdv_D1
End
TrackMarks = EXTnkTrack.tga
TreadAnimationRate = 2.0 ; amount of tread texture to move per second
TreadDriveSpeedFraction = 0.3 ; fraction of locomotor speed below which treads stop moving.
TreadPivotSpeedFraction = 0.6 ; fraction of locomotor speed below which we allow pivoting.
OkToChangeModelColor = Yes
End
WeaponSet
Conditions = None
Weapon = PRIMARY Lazr_CrusaderTankGunAdv ;don't work right, should have 2 larsers firing from seperate barels
Weapon = SECONDARY AvengerTargetDesignator ;this works
WeaponLockSharedAcrossSets = Yes ; This set is so similar to the default set that it can hold the weapon lock
End
Vger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-01-2004, 08:56 AM   #2 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 386
Send a message via AIM to warlord Send a message via MSN to warlord Send a message via Yahoo to warlord
Default

you only need 1 laser bone coded so name it without the 01 or 02. Then it should use the 2 bones 01 first then 02 but dunno what to do if it needs a specific bone name but its worth a shot at just 1 bone and no number at the end. Hopefully that helps but if not i will try and look into it.

Edit: Oh and 1 more thing when you have 2 of the same codes for the weapon/object it uses the last listed of the same code so it was using 02 bone.
warlord is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-01-2004, 09:18 PM   #3 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 306
Send a message via AIM to Vger Send a message via MSN to Vger Send a message via Yahoo to Vger
Default

I have to sepperate bones, one on each barel. I revised the code and some what copied the overlord code in a way. Now the laser comes from the middle of the tank instead of either of the barels.

The code for the lasers:
;------------------------------------------------------------------------------
Weapon Lazr_CrusaderTankGunAdv
PrimaryDamage = 80.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 150.0
MinTargetPitch = -15 ; we may not target anything outside of this pitch range
MaxTargetPitch = 15 ; ditto
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 99999 ; dist/sec
WeaponRecoil = 5 ; angle to deflect the model when firing
LaserName = Lazr_CrusaderLaserBeam
LaserBoneName = TurretMS ;Two bones: TurretMS01 TurretMS02, got from overlord tank code, allows for more than one barel to fire
FireFX = Lazr_WeaponFX_LaserCrusader
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 500 ; time between shots, msec
ShotsPerBarrel = 1 ; got this and one bellow from overlord tank code, allows for more than one barel to fire
ClipSize = 2 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 1000 ; how long to reload a Clip, msec

Some code for tank:
;----------------------------------------------------------------------------------
Draw = W3DTankDraw ModuleTag_01
DefaultConditionState
Model = AVLaserTnkAdv
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS ;overloard code again
WeaponRecoilBone = PRIMARY Barrel
WeaponLaunchBone = PRIMARY TurretMS ;overloard code again
WeaponLaunchBone = SECONDARY TurretFX03
End
ConditionState = REALLYDAMAGED
Model = AVLaserTnkAdv_D
End
ConditionState = RUBBLE
Model = AVLaserTnkAdv_D1
End
TrackMarks = EXTnkTrack.tga
TreadAnimationRate = 2.0 ; amount of tread texture to move per second
TreadDriveSpeedFraction = 0.3 ; fraction of locomotor speed below which treads stop moving.
TreadPivotSpeedFraction = 0.6 ; fraction of locomotor speed below which we allow pivoting.
OkToChangeModelColor = Yes
End
WeaponSet
Conditions = None
Weapon = PRIMARY Lazr_CrusaderTankGunAdv ;don't work right, should have 2 larsers firing from seperate barels
Weapon = SECONDARY AvengerTargetDesignator ;this works
WeaponLockSharedAcrossSets = Yes ; This set is so similar to the default set that it can hold the weapon lock
End

[/img]
Vger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2004, 12:50 AM   #4 (permalink)
Junior Member
 
Join Date: Jan 2004
Posts: 15
Default

What you need to do is make 2 weapon objects. Say laser01 and laser 02 each pointing to a different bone.

Set laser01 as primary and laser02 as secondary.

Weapon objects:
Code:
Weapon Lazr_CrusaderTankGunAdv01
bla bla ....
LaserBoneName = TurretMS01
... bla bla
End

Weapon Lazr_CrusaderTankGunAdv02
bla bla ....
LaserBoneName = TurretMS02
... bla bla
End
Then in the unit object, go to weaponset and write somthing like this:
Code:
 
WeaponSet 
Conditions = None 
Weapon = PRIMARY Lazr_CrusaderTankGunAdv01
Weapon = SECONDARY Lazr_CrusaderTankGunAdv02
Weapon = TERTIARY AvengerTargetDesignator
WeaponLockSharedAcrossSets = Yes
End
Should work
akimsko is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2004, 03:11 AM   #5 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 306
Send a message via AIM to Vger Send a message via MSN to Vger Send a message via Yahoo to Vger
Default

I was thinking about doing that but at first I didn't want to do that, yet I guess I have to.

The only problem is that this way both lasers will fire at the same time and I wanted them to alternate per barrel.

Anyone have more ideas on how to get it to work.
Vger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2004, 04:28 AM   #6 (permalink)
Junior Member
 
Join Date: Nov 2003
Posts: 13
Send a message via MSN to Chronologic
Default

PreAttack delay on the second laser weapon to fake it?

That's all I can think of right now, but it's early after an all-nighter, so I appreciate I'm not at my best.
Chronologic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2004, 10:06 AM   #7 (permalink)
Junior Member
 
Join Date: Jan 2004
Posts: 15
Default

Yeah I know its not optimal. I was working on a simular unit, and it was the only way I could get it work.

Although it can be done with normal tankshell objects, lasers objects require the origin bone to be set in the weapon object and not in the unit itself. And for some reason it doesnt use the same logic of determening its origin. ie. a laser can only have 1 origin bone, while weapon objects whos origin bones are defined in the unit itself, will try to determine if more bones with the same name are present (myoriginbone01, myoriginbone02 etc.).

Try to have a look at the avenger code, it works the same way, with two simular laser waepon objects, each pointing to a different bone.

However, I didnt code the bloody game, and can only make guesses about whats going on under the hood. So If you do find a way to get it to work with 1 weapon object, plz let me know
akimsko 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
Made a Laser Mammoth Tank model but don't know how to map it SephirothX75 Generals & Zero Hour Editing 12 09-01-2004 04:01 PM
Dual turret GLA tank? adamstrange Generals & Zero Hour Editing 4 07-16-2004 01:32 PM
Prism Tank Laser Weapon [WIP] warlord Generals & Zero Hour Editing 6 07-02-2004 12:57 AM
Tank mounted Dual particle uplink cannon andigo99 Generals & Zero Hour Editing 6 12-29-2003 01:31 PM
The laser effect like the prism tank in RA2? warlord Generals & Zero Hour Editing 81 09-15-2003 11:02 AM


All times are GMT -4. The time now is 09:29 PM.


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