Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

ScenEdit: Temporary "Hold Position"

 
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 >> ScenEdit: Temporary "Hold Position" Page: [1]
Login
Message << Older Topic   Newer Topic >>
ScenEdit: Temporary "Hold Position" - 12/6/2015 5:39:46 PM   
Aivlis

 

Posts: 63
Joined: 12/5/2015
Status: offline
Hi,

I'm struggling to solve one particular issue: how to make a unit that can't fire on the move stop and fire, and then continue on with whatever mision it was on. The particular use case is stopping a SAM unit that can't fire on the move if it's convoy is approached by hostile A/C. More concretely, I'm trying to redo the Hunting Day, 2008 scenario without the teleport system, so the escorting SAM behave more rationally.

I can easily manage to stop a unit using LUA by attaching a zone to it and using the "Unit Enters Area" trigger and the following LUA bit:
quote:

ScenEdit_SetUnit({name="MyUnit", HoldPosition=1})


However, the problem lies in removing that HoldPosition flag.
The "Unit Enters Area" stops the SAM alright (even if it's not detected when it enters, but I can compromise on that), but the negated version of the same trigger doesn't cut it (both because a dead Bogey can't "leave" and because the logic is "when a unit is NOT within this area do X" so as long as not all hostile aircraft approach the SAM it won't fire.)

How do you veterans do this kind of stuff?

< Message edited by Aivlis -- 12/6/2015 6:43:16 PM >
Post #: 1
RE: ScenEdit: Temporary "Hold Position" - 12/6/2015 7:48:31 PM   
Aivlis

 

Posts: 63
Joined: 12/5/2015
Status: offline
I went for a walk and came back with a solution: use a neutral "Logic" side to the conflict to have a truck drive back and forth across a detection zone, and every time it passes through it, order my SAM to keep moving. If the delay between orders to resume movement is long enough the SAM will remain still and engage any bogies in the designated area.

The downsides are that if it's engaged when the "Keep Moving" order comes in it may twitch for a second before it gets overridden by the "Stop and Fire" event, which fires continuously if a hostile A/C is in range. This could be a problem for certain SAM systems that require illumination for their targets (not tested, just my gut sense).

Does anyone have a different approach? Am I over-complicating things and this could be done with a few lines of code?

(in reply to Aivlis)
Post #: 2
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> ScenEdit: Temporary "Hold Position" 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.142