Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Using detection event to attack ...

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Using detection event to attack ... Page: [1]
Login
Message << Older Topic   Newer Topic >>
Using detection event to attack ... - 2/21/2018 1:01:55 PM   
michaelm75au


Posts: 12471
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
I have created a simple scenario that shows how a ship could be ordered to attack with Lua.
This is from an older example I had for testing, but have updated to use UnitX and UnitY.

There is an event that triggers on detection of SideA's LST400. When it triggers and the unit is identified as LST400, the SideB DDG is given instructions to attack the contact with a 'gun' weapon (manual weapon allocation). There is a commented line showing how to auto attack the contact.
In this case, the DDG is not in range or has the correct weapon on the mount. So once the attack order is issued, it reloads the correct weapon and closes with the target. [if it had been in range and weapon ready, it would have just started firing]. Once in range it fires the requested number of shells, and then stops.

Just load the scenario and press start. Time compressing to 2 seconds will speed it up without missing anything.


Attachment (1)

_____________________________

Michael
Post #: 1
RE: Using detection event to attack ... - 2/21/2018 8:46:22 PM   
AlGrant


Posts: 837
Joined: 8/18/2015
Status: offline
It's almost like you knew what I needed for the scenario I was building earlier today!

_____________________________

GOD'S EYE DISABLED.

(in reply to michaelm75au)
Post #: 2
RE: Using detection event to attack ... - 2/21/2018 11:47:53 PM   
AlphaSierra

 

Posts: 132
Joined: 2/13/2017
Status: offline
Very cool Thanks Michael

_____________________________

I wish to have no connection with any ship that does not sail fast; for I intend to go in harm's way. -John Paul Jones

(in reply to AlGrant)
Post #: 3
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Using detection event to attack ... Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.102