View topic - Weapon Arcs on top of weapon arcs



All times are UTC + 1 hour


Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 29 Mar 2012, 14:40 
Map Creator
User avatar

Joined: 12 Jan 2005, 10:25
Location: Still signing off after all these years
OK, question, I have a two turrets one mounted on the other...

http://www.youtube.com/watch?v=dmPrPH-g4NA&feature=g-upl&context=G2a2b97eAUAAAAAAAAAA - video doesn't show actully firing, just a reference so you can see the turret set up.

I know what your thinking thats 1 turret, with four guns. And I can do that, that works fine. However what I want to do is make both arms seperate turrets. So, I have it set up so the left side is turret 1 (which is aimed by moving the body around). I then have the rigth hand side as turret 2, I want this to aim within a limited arc from whichever way the body is facing. Is there a way to set up the fire arcs to that it can do this? Currently if I give the second weapon a fire arc, work based on which way the unit is facing, not on which way the primary turret is turned (which does make sense, it just obviosly doesn't help with what I want to achive.)


Top
 Offline Profile  
 
PostPosted: 29 Mar 2012, 16:51 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
What kind or arc are you thinking?

Afaics; either script the arc, or just give the weapon suitable tolerance


Top
 Offline Profile  
 
PostPosted: 29 Mar 2012, 17:35 
Map Creator
User avatar

Joined: 12 Jan 2005, 10:25
Location: Still signing off after all these years
Code:
[1]={name  = "Basic Laser",
   onlyTargetCategory = [[LAND]],
   },
},
[2]={name  = "Basic Laser",
   onlyTargetCategory = [[LAND]],
   mainDir = [[0 0 1]],
   maxAngleDif = 90,
   },
},


OK, heres the two weapons, 1 can fire anywhere, 2 can shoot in an arc of 90 forwards. However becasue weapon 2 is mounted on weapon 1, what I actully need is weapon 2's arc to be based on which way weapon 1 is pointing not which way the unit is facing... does that make more sense?

I can script it so it can physicly move past that angle, but it doesn't know why it can't without a firearc so it will atempt to target things it can't hit, causeing the weapon to jam untill that target it can't reach is dead or out of range...

Does this make more sense now? Think my explanation sux...


Top
 Offline Profile  
 
PostPosted: 29 Mar 2012, 19:22 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
So basically the torso turns to aim, but attached to the torso are 2 arms that also aim in a limited arc?

In spring, does the fire arc work 1) per unitheading or 2) per-piece heading? (firearc rotates with the parent piece)

iirc there are functions to controll what unit a weapon will target*, so you could do some "can i reach this?" calculations and either allow shooting or make it pick a new target.
*=never got that to work as i wanted


Top
 Offline Profile  
 
PostPosted: 29 Mar 2012, 20:27 
Spring 1944 Developer
User avatar

Joined: 11 Oct 2005, 06:18
Location: Ukraine
knorke wrote:
In spring, does the fire arc work 1) per unitheading or 2) per-piece heading? (firearc rotates with the parent piece)


It's option 1.

Take a look at S'44 tank coaxial machine guns, they are only allowed to fire in a small arc relative to turret rotation (set by main gun). Not 90 degrees of course, but may be a start. But it's a scripted feature, not engine one.


Top
 Offline Profile  
 
PostPosted: 30 Mar 2012, 09:38 
Map Creator
User avatar

Joined: 12 Jan 2005, 10:25
Location: Still signing off after all these years
Had a horrible feeling it would be one. :-( I'll have a look to see if I can find out what its targeting and if I can make it keep polling through till it finds a valid target.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.