Login  Register
 



Post new topicReply to topic
 
Author Message
 PostPosted: 02 Jan, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
Ok, so I have a structure with 4 PD turrets, each with a different 45 degree arc of fire. When a unit approaches from one side, all 4 weapons attempt to target it and ignore any new units until the first one is dead... But don't necessarily retarget one that they can hit.

I'm not familiar with weapon target search functions... Any suggestions?

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
 PostPosted: 02 Jan, 2011 
 
User avatar

Joined: 01 May, 2007
Posts: 4219
Offline
The Fatboy is setup to do just this.... Look at how it's weapons are set up for details.

Resin

_________________
Image
Blackhole http://www.youtube.com/watch?v=B3aDT0Ft_Yg
WOFhttp://www.youtube.com/watch?v=FVqMqz8PgEc
FOD http://www.youtube.com/watch?v=be9cu9UHv-U
TML http://www.youtube.com/watch?v=1Apk08LAtxc


Top
 Profile  
 PostPosted: 02 Jan, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
Erm... Actually, it's not. I looked at the script and it has nothing in there except emitter stuff until it hits DefaultProjectiles. If anything, looking at the BP, it looks like it's set to try to get all weapons to choose the same target by PrefersPrimaryWeaponTarget = true

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
 PostPosted: 02 Jan, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
It's in each weapon's blueprint. HeadingArcCenter and HeadingArcRange. The latter needs to match TurretYawRange, and the former needs to match the turret bone's rest point (plus/minus blueprint yaw?), since that's what the turret's yaw range is based on.

For example, if a turret with a 90 degree yaw has a rest point 90 degrees to the right (or left, uh, I don't recall which side is negative and which is positive), you would want HeadingArcCenter of 90 and HeadingArcRange of 90. The turret itself would have a TurretYaw of 0, since that's based on rest point. Again, I don't know if TurretYaw modifies TurretYawRange from the rest point.

Also, be careful when looking at the fatboy's weapons for inspiration. Their heading ranges are inconsistent and bugged as hell and do NOT work properly. Plenty of them try to target outside their yaw ranges, and others ignore targets they could hit.


Top
 Profile  
 PostPosted: 02 Jan, 2011 
 
User avatar

Joined: 01 May, 2007
Posts: 4219
Offline
Mithy wrote:
It's in each weapon's blueprint. HeadingArcCenter and HeadingArcRange. The latter needs to match TurretYawRange, and the former needs to match the turret bone's rest point (plus/minus blueprint yaw?), since that's what the turret's yaw range is based on.

For example, if a turret with a 90 degree yaw has a rest point 90 degrees to the right (or left, uh, I don't recall which side is negative and which is positive), you would want HeadingArcCenter of 90 and HeadingArcRange of 90. The turret itself would have a TurretYaw of 0, since that's based on rest point. Again, I don't know if TurretYaw modifies TurretYawRange from the rest point.

Also, be careful when looking at the fatboy's weapons for inspiration. Their heading ranges are inconsistent and bugged as hell and do NOT work properly. Plenty of them try to target outside their yaw ranges, and others ignore targets they could hit.



Yeah... tis the point i though i was making. Here i was assuming he'd see it and realize.

Resin

_________________
Image
Blackhole http://www.youtube.com/watch?v=B3aDT0Ft_Yg
WOFhttp://www.youtube.com/watch?v=FVqMqz8PgEc
FOD http://www.youtube.com/watch?v=be9cu9UHv-U
TML http://www.youtube.com/watch?v=1Apk08LAtxc


Top
 Profile  
 PostPosted: 03 Jan, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
Ahh, thanks guys. Yeah, I figured this was something that had to be solved with script code, so that's what I was looking for. I did miss seeing those BP values, although I wouldn't have recognized them for what they were even if I had seen them. :P

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
 PostPosted: 03 Jan, 2011 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
Fury just one thing to keep in mind for the future. (Doesn't nessessarily apply to structures)

One thing to keep in mind is that the HeadingArc controls are based on the unit's overall facing rather than the turrets. Which means if your using stacked turrets (example: a small gun mounted on top of a tank's main turret) it can cause targetting problems if the upper turret has a restricted arc because of the chance that the lower turret will not be pointing at anything the upper turret can actually accept as a target :P


Top
 Profile  
 PostPosted: 03 Jan, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
Thanks Exavier. I wasn't planning on anything like that, but it's good to know nonetheless.

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
 PostPosted: 04 Jan, 2011 
 
User avatar

Joined: 01 May, 2007
Posts: 4219
Offline
Exavier Macbeth wrote:
Fury just one thing to keep in mind for the future. (Doesn't nessessarily apply to structures)

One thing to keep in mind is that the HeadingArc controls are based on the unit's overall facing rather than the turrets. Which means if your using stacked turrets (example: a small gun mounted on top of a tank's main turret) it can cause targetting problems if the upper turret has a restricted arc because of the chance that the lower turret will not be pointing at anything the upper turret can actually accept as a target :P


Yeah in that case it's best not to use the HeadingArcRange at all on the Secondary turret as this will definetly restrict it when the Primary turns. Instead use heading restrictions on the Primary and give the Secondard only yaw and pitch limits. The primary heading is based off the direction the units "parent bone" is facing at any given time. Hence, all weapons are always considered relative to this facing.

One good example of this is the 4DC UEF Rampage assault bot. Both gun arms can target and act independantly of each other while still working together to focus on a single target if so directed by the player. Each of those arms has a secondary weapon under the main cannon, that as far as i know of, there isn't a HeadingArcRange or HeadingArcCenter defined for the secondaries.

The only way i know of to get around this is to spawn the Secondary turret seperately and attach it to a mounting point on the Primary weapon. This way the facing of the Primary weapon is always the "0" heading of the secondary, reguardless of which way the unit itself is facing. Be aware however that this means that the "attached" secondary turret isn't under the direct control of the primary unit at all and as such can be targeted, take damage, be selected and issues orders independantly from the main unit. This can lead to a few new possibilities with a units weapon being directly targeted and destroyed while leaving the main unit intact. This assumes that the hit boxes of the main unit and the secondary attached turrets are not overlapping.

P.S. I bet that last bit just blows your mind huh !?!

Resin

_________________
Image
Blackhole http://www.youtube.com/watch?v=B3aDT0Ft_Yg
WOFhttp://www.youtube.com/watch?v=FVqMqz8PgEc
FOD http://www.youtube.com/watch?v=be9cu9UHv-U
TML http://www.youtube.com/watch?v=1Apk08LAtxc


Last edited by Resin_Smoker on 04 Jan, 2011, edited 3 times in total.

Top
 Profile  
 PostPosted: 04 Jan, 2011 
 
User avatar

Joined: 01 May, 2007
Posts: 4219
Offline
Pitch How far up and down from Center. 45 degrees of span provides for a 90 degree total arc of travel, 45 degrees up and 45 degrees down from center.

Yaw How far left and right from Center. 90 degrees of span provides for a 180 degree total arc of travel, 90 degrees left and 90 degrees down from center.

Heading Arc Center Center position of the turret relative to the current facing of the units main bone.

Heading Arc Range Provides a control for the overall span the weapon will actively "look" for a target based upon it's relative rest position.

Here is what I'd suggest for a 4-turret structure, assuming the weapons are on the corners of the structure. This should provide for overlapping field of fire but without the guns attempting to shoot thru each other or track targets that they can't possibly shoot at.

Code:
A    B

C    D


A: Left Side Front Turret
Pitch 45,
Yaw 90,
Heading Arc Center 45,
Heading Arc Range 90,

B: Right Side Front Turret
Pitch 45,
Yaw 90,
Heading Arc Center -45,
Heading Arc Range 90,

C: Left Side Back Turret
Pitch 45,
Yaw 90,
Heading Arc Center 135,
Heading Arc Range 90,

D: Right Side Back Turret
Pitch 45,
Yaw 90,
Heading Arc Center -135,
Heading Arc Range 90,

Notice how all of the turrets are set up the same but only have differing Heading Arc Center.

Resin_Smoker

_________________
Image
Blackhole http://www.youtube.com/watch?v=B3aDT0Ft_Yg
WOFhttp://www.youtube.com/watch?v=FVqMqz8PgEc
FOD http://www.youtube.com/watch?v=be9cu9UHv-U
TML http://www.youtube.com/watch?v=1Apk08LAtxc


Top
 Profile  
 PostPosted: 04 Jan, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
Thanks guys, I just tested last night and it's working perfectly now.

Resin: Actually, I have the guns set in the middle of the sides and intentionally left small gaps in their field of fire next to the structure that they can't shoot. Course, the next Tech level of the structure should have this area reduced significantly, and progressively get less till it hits T4 when there should be no gaps left at all. If you guys are interested in seeing it, here's my post in the Critique Thread from the Modeling forum.

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy