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

Forum Info
Forum Members: 18,575
Total Threads: 8,656
Posts: 94,426

Administrators:
DeeZire, Redemption

There are currently 64 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 02-28-2006, 06:09 AM   #1 (permalink)
Member
 
Join Date: Sep 2004
Posts: 39
Default To pitch or not to pitch

I made these base defences that have a turret and a turretEL for elevation
when targeting aircraft the barrels move up to the right position to target the craft, when targeting ground units they move to a horizontal (flat) angle, but strangly when constructed on elevated ground like a hill or so and they target ground units the barrels dont pitch "down" (to a negative angle) but remain horizontal (flat) and the bullets leave the barrels at a angular position! This is particular annouying with my railgun turret! :dead: It fires horizontaly over the target missing it by an inch or so but still "hitting" it!

1 My question is what is the best way to fix this little bug??
2 What do MinPhysicalPitch =
GroundUnitPitch =
do?
3 Declaring minpitch and maxpitch in the weapon.ini wont help i think
right, because normaly it handles the the patch between barrel mouth
and target??

Tx in advance
DarkSentinel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2006, 07:56 AM   #2 (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

Start by setting TurretPitch = TurretEL (or whatever the bone is) in the default ConditionState in your model's draw module.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2006, 08:39 AM   #3 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default Re: To pitch or not to pitch

Quote:
Originally Posted by DarkSentinel";p=&quot View Post
1 My question is what is the best way to fix this little bug??
2 What do MinPhysicalPitch =
GroundUnitPitch =
do?
3 Declaring minpitch and maxpitch in the weapon.ini wont help i think
right, because normaly it handles the the patch between barrel mouth
and target??
1. what CodeCat posted of course, and check also that these important bones like the Turret, TurretPitch, WeaponLaunchBone etc. have the default angle set in the 3d model (rotation: x:0 y:0 z:0). You get this default rotation automatically when you place an object in the "Top" view of the 3d program.

2. Afaik MinPhysicalPitch defines how much the TurretPitch bone can pitch down (in degrees). I guess it's more an art tag so that you prevent ugly pitches.
Not really sure what GroundUnitPitch defines exactly...

3. Min and/or MaxPitch in weapon.ini can be used e.g. instead of using the AttackRange tag, as far as they can only shoot against aircrafts in this weapon. Again, you can use it to prevent ugly pitches. Imagine an aircraft is to near to your turret and depending from the 3d model you have it could look ugly if the TurretPitch bone rotates nearly 90 degrees to face the aircraft.
That means the turret only shoots (and the TurretPitch bone only lifts) when units are within default pitch + MaxPitch OR MinPitch + MaxPitch.
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2006, 10:36 AM   #4 (permalink)
Member
 
Join Date: Sep 2004
Posts: 39
Default

tx guys gonna check on it and will post what i got later!

Edit:
Ok, i doublechecked my bones in gmax --> my turret01 and turretel01 are correctly aligned and so are all pivot points. Turning and elevation work normaly in game except down elevation then!

turret and turretel are correctly named in ini file so thats ok too!

Only thing thats remains is the aiupdateinterface module tag I think and maybe the weapon it self.

But i kinda checked the gattling cannon of china to see what it would do on a hill ->>> it doesnt pitch down either!!!!! try a map like alpine assault and see for yourself if u like!

So i gotta ask is possible to even let the barrel of a turret pitch down to compensate for terrain???

Anyway here is the code for my defense:


Behavior = AIUpdateInterface ModuleTag_20
Turret
ControlledWeaponSlots = PRIMARY
TurretTurnRate = 180 // turn rate, in degrees per sec
TurretPitchRate = 180
AllowsPitch = Yes
FiresWhileTurning = Yes
;NaturalTurretPitch = 45 ; this keeps it aimed half way between land
and sky
;MinIdleScanInterval = 250 ; in milliseconds
;MaxIdleScanInterval = 250 ; in milliseconds
;MinIdleScanAngle = 0 ; in degrees off the natural turret angle
;MaxIdleScanAngle = 360 ; in degrees off the natural turret
angle
End
AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS; defensive
weapon
MoodAttackCheckRate = 250
End

<<<<<<<<pretty strait forward i thought???>>>>>>>>>


the weapon code!!!!


Weapon TowerRailgun
PrimaryDamage = 250.0
PrimaryDamageRadius = 10
AttackRange = 400.0
ScatterRadius = 2
DamageType = ARMOR_PIERCING
DeathType = EXPLODED
WeaponSpeed = 1850.0
ProjectileObject = RailGunShell
ProjectileStreamName = RailGunStreamJet
FireSound = LaserCrusaderWeapon
FireFX = WeaponFX_GenericTankGunNoTracer
RadiusDamageAffects = ENEMIES NEUTRALS
DelayBetweenShots = 500
ClipSize = 4
ClipReloadTime = 5000
AntiAirborneVehicle = No
AntiAirborneInfantry = No
AntiSmallMissile = No
AntiBallisticMissile = No
AntiGround = Yes
DamageDealtAtSelfPosition = Yes
End

<<<<<<do i need to add max and min pitch here??>>>>>





tx in advance
DarkSentinel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2006, 11:27 AM   #5 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

uh why do you have 2 projectile things?

ProjectileObject = RailGunShell
ProjectileStreamName = RailGunStreamJet

I guess this can cause problems, maybe it's not the main problem but you should only have 1 type; ProjectileObject OR ProjectileStreamName

And no, you don't need to add Min or MaxPitch there. It definetly must work without this.
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2006, 11:26 PM   #6 (permalink)
Senior Member
 
CommieDog's Avatar
 
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 370
Default

ProjectileStreamName doesn't specify a projectile, but rather a separate object that links two (or more) projectiles together to produce a solid stream, as seen in the Toxin Tractor's weapon.
CommieDog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-01-2006, 04:05 AM   #7 (permalink)
Member
 
Join Date: Sep 2004
Posts: 39
Default

True, but i guess i dont need it because my "railgun trail" is added in the code for the object it fires (the railgunshell). Will remove it and see what it gives then!
DarkSentinel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2006, 05:35 AM   #8 (permalink)
Member
 
Join Date: Sep 2004
Posts: 39
Default

Cant get my turret to shoot at a negative pitch! I dont think that it isnt possible at all with out using the firepitch command and setting it to a negative angle. But then it will always fire at this angle and it want i to just compensate for elevation of terrain!
DarkSentinel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-06-2006, 05:38 AM   #9 (permalink)
Member
 
Join Date: Sep 2004
Posts: 39
Default

Got my tuurets to pitch correctly according to terrain. I had to set the minphysicalpitch line in the aiupdate section on the object and add the minpitch in the weapon. ini.
DarkSentinel 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
Camera Pitch - disappearing map Sgt-Skleni Map Authoring 4 01-15-2006 11:44 AM
angle and pitch goblinsleez Generals & Zero Hour Editing 14 03-24-2005 04:58 PM
Changing the camera's pitch in-game Capt_Pickles Generals & Zero Hour Editing 3 07-09-2004 06:35 AM
Turret pitch when firing EvilViking Generals & Zero Hour Editing 6 05-20-2004 04:55 PM
having a button that changes the Pitch? LtZack Generals & Zero Hour Editing 4 04-19-2003 07:25 AM


All times are GMT -4. The time now is 12:08 AM.


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