View unanswered posts | View active topics It is currently Mon Jul 08, 2024 4:44 pm



Reply to topic  [ 9 posts ] 
 Script: Restricting Aim Angle to for a turret. 
Author Message
User avatar

Joined: Mon Oct 25, 2010 5:51 am
Posts: 1198
Location: Sydney
Reply with quote
Post Script: Restricting Aim Angle to for a turret.
Hello, .lua scripters of DRLFF.

Once again, I envy your ability to make weird ♥♥♥♥ happen in Cortex Command, and I seek guidance from your brilliant, logical minds.

Using some of Witty's scripts to attach ACrabs to a dropship, I have a hulking troop transport with a couple of MG mounts. What I would like to do is restrict their aim range to something like what's in the diagram below:
Image
Script so far (all of this is Witty's)

Any help would be appreciated!


Fri Sep 02, 2011 1:39 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
I'd like to help you but for that I would need the whole .rte to be able to make tests.


Fri Sep 02, 2011 2:31 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
Start off by defining two turrets, one for left and one for right. Then attach these scripts to them.

Left:
Right:
Credits to Abdul Alhazred for the original.

Sadly, these restrictions do only apply to an equal rotation above and below the horizon. I'll come back if I find a way to do it otherwise.


Fri Sep 02, 2011 2:41 pm
Profile
User avatar

Joined: Mon Oct 25, 2010 5:51 am
Posts: 1198
Location: Sydney
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
Thanks for the help guys, Roast, that script says that the 'gun' is a nil value or something, I attached the separate ones to the two turrets. Mehman, I'll upload the .rte in the morning, well, later on today. Its quite late here.
Thanks again for the help, both of you.


Fri Sep 02, 2011 3:36 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
UFO's! I wish the Zealots would have a ship like that. My compliments on this awesome looking device. :grin:


Fri Sep 02, 2011 3:44 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
Are the turrets HitsMos = 1?


Fri Sep 02, 2011 5:57 pm
Profile
User avatar

Joined: Mon Oct 25, 2010 5:51 am
Posts: 1198
Location: Sydney
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
Roast Veg wrote:
Are the turrets HitsMos = 1?


Yeah, it's located in Wehrmacht.rte/Actors/Craft, it still throws errors :(

Attachment:
Wehrmacht.rte.7z [8.38 MiB]
Downloaded 168 times


Sat Sep 03, 2011 4:59 am
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
Attachment:
Wehrmacht.rte.7z [8.37 MiB]
Downloaded 170 times


Sat Sep 03, 2011 6:00 pm
Profile
User avatar

Joined: Mon Oct 25, 2010 5:51 am
Posts: 1198
Location: Sydney
Reply with quote
Post Re: Script: Restricting Aim Angle to for a turret.
Mehman have I ever told you that I love you you're a cool dude? Thanks for the help, works great now.


Sun Sep 04, 2011 3:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users


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 © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.106s | 14 Queries | GZIP : Off ]