Thanks. The video shows the way to trigger an action when one unit gets a specific distance from another, moving unit. You attach a zone to a moving unit then specific the unit which will activate it.
The way I understand the logic is that every time the trigger is tested, it looks at the moving unit and gets its location, then looks at the zone and substitutes the moving unitās location for the zone location, then looks at the radius of the zone and does the math to see if the triggering unit is inside that radius.
So really, other than the Zoneās name and radius, nothing else is looked at - the zone is still where you originally plotted it. In other words, it does not ādragā the zone around with the moving unit. Which is what I wold need for what I am trying to do.
The actual Activate Beacon command is not listed for any ship type. Ironically the Deactivate Beacon is listed for CVNs. Activate TACAN and Activate ICLS are the only activate options and again, just for carriers.
The Transmit Message is not listed for ships.
That said, from the links you provided, is this just a matter of loading in a short script?
ActivateBeacon = {
id = āActivateBeaconā,
params = {
type = 32776,
system = 7,
name = string,
callsign = xxx,
frequency = 30.10,
}
}
The Activate Beacon has a BEACON_TYPE_NAUTICAL_HOMER = 32776 which I assume puts out some type of soundā¦but Iāve got a shore sound file of morse code that would work with transmit message in a loop.
Basically, both are commands done via the AI tasking system. The above commands are tables that can be used in conjunction with setTask and pushTask.
Not the exact scripting used (Iād need to trial and error it), but itād be comparable to this:
ā our task table
mybeacontask = {
id = āActivateBeaconā,
params = {
type = 32776,
system = 7,
name = āā,
callsign = xxx,
frequency = 30.10,
}
}
ā our group AI controller
myshipcontroller = Group.getController(Group.getByName(āmyshipgroupā))
ā push the task table to the group
Controller.pushTask(myshipcontroller,mybeacontask)
For ActivateBeacon I donāt know what the breakdown is of the various types or how they function as Iām only familiar with the ILS and TACAN beacon types. For TransmitMessage, it should be identical to the editor functionality, though again for ships it would use their frequency as set in the editor as opposed to the setFrequency command.
Issue: Using the āUncontrolledā option when setting an AI aircraft on the ramp with a delayed start up time. I thought I had this working but evidently not
EDIT: The answer was that I had it working previously and if I had scrolled down a bit I would have had no problems. Please disregard this entire post.
From the manual:
UNCONTROLLED. When setting an AI group to a āTakeoff from Rampā (cold start) waypoint,
the Uncontrolled check box can be used to have the AI group appear at their starting location
on the ramp, but not begin the spool up sequence until initiated by an AI TASK trigger as set by
the START Command in the Triggered Actions of the group. In this case, the group aircraft will
appear in the mission in parked configuration and remain as such until triggered to ācome aliveā.
There is no START command in the Triggered Actions.
Using Late Activation with Uncontrolled initially causes the aircraft not to appear - when they do, they are empty (no pilot)/do not start engines, etc.
Using Uncontrolled with another Triggered Action ā Perform Command such as Switch Waypoint, shows the jet on the ramp, but no action/pilot at the triggered perform command time.
Using Uncontrolled and setting a later Start time (i.e. 30 seconds from mission time) caused the jets not to appear and no startup when they do. Same as using Late Activation with Uncontrolled.
Not seeing a work around hereā¦other than put the aircraft in bunkers.
Am I missing something?
EDIT: Yes I was missing something. Many, many thanks to @weaponz248 and @Franze for putting me on the correct path.
Uncontrolled works by setting them on the ramp and checking the box (you might have to deselect the group to get the checkbox to appear), then in the groupās triggered actions field, add an action, select type perform command and start from the action list. This can then be used with the missionās triggers with the AI Push Task action, where youāll get a list of available actions to choose from and can then pick the start action. This will cause the group to begin their startup procedure and run their waypoints plus tasks.
Yeahā¦so I hadnāt noticed the scroll bar at the left side of the Perform Command listā¦I was only seeing down to Immortal and thought that was the entire listā¦do you have a nice rock I can crawl under?
Next Question: How the heck do you get AI artillery or MRLS to shift bombardment areas. Example: The overall target is an airfield. I want a Grad Bty to bombard a couple different areas. First the fighter apron; next the tanker apron; next a munitions storage building, etc.
I have tried a number things and none really work. I wanted to set up a few Triggered Action Fire at a Point Tasks. It doesnāt seem to take Fire at a Point Triggered Actions. Iāve tried Set and Push, neither works.
The Fire at a Point task seems to only work from a Advanced Waypoint Action. OK, but how to then shift fire? Iāve had some success with using a kind of āShoot and Scootā with tube artillery - after a time at one WP, drive to another WP with another Fire at a Point task. OK for tube ARTY but MRLS get squarely when they have to drive around like that.
I would have thought that setting a series of Waypoint Advanced Actions - Task ā Fire at a Point then set Start and Stop Conditions (based on time with a couple of minutes in between). No joy. It executes the first and then just sits there.
A MRLS will continue to execute its first Fire at a Pint Task over and over again. I have a rearming vehicle so it just shoots all its rockets, reloads, and repeats. But the same impact area.
Canāt say for the ME but in game with CA assigning multiple targets with a number of rounds fired allows them to conduct a fire mission and than cycle targets. Perhaps try setting a number of shots value?
I put 4 Artillery units in game and had targets 180 out from each other so I could see the change in targets. I tried flags and end times but no engagement of the second target. I believe the stop command from the first target is āoverridingā any other command.
As soon as I gave them a number of rounds to fire it worked. I set it to 5 and once they fired 5 rounds they turned 180 and engaged target 2.
So that leads me to conclude that your final target engagement can have the stop command but no targets before it.
Ah ha! That makes sense from a computer code programing point of view and is the kind of thing that traditional Beta testing is meant to catchā¦an obscure issue.
Yes, I think this is a solution! Rocket launchers have a set number of rounds/tubes - 40 per Grad, 16 per Uragan, etc. So then it becomes simple math. 3 Grads = 120 rounds, so 60 rounds on the first target; 60 rounds on the second target.
I wonder it I can āpushā those numbers by using a rearming vehicle. The whole 120 on the first targetā¦a second 120 on the next target after reloading. If not, I think it is just a matter of adding individual MRLS to the battery to get the desired effect per volley.
We should try to get the performer to let use that as background in MiG-21 missions!
Didnāt Halo have a music sound track that changed according to the onscreen action? IIRC you knew a certain type of enemy was present is you heard cello music. Maybe southing like that.
I see itās been answered, but the rounds expend option is the one youāre looking for. Set that number for the rounds you want them to expend and they will automatically switch to the next task. If that number is greater than the entire unitās ammo supply, then if possible they will rearm, then fire until the round count is complete. If you want a continuous barrage until some condition, then you will need to use resetTask, setTask, and popTask to clear the current task and assign the new target.
For Offensive Posture I had a problem of artillery constantly firing and turning the area into a cratered moonscape after about an hour; my solution was to have the task in a script and set a 20 round firing cycle every 15 minutes. This kept the craters a bit more manageable over the missionās duration.
--artillery task function
function artytargettask(groupname)
local sideid = groupname:getUnit(1):getCoalition()
local targposx = -241506.0936196
local targposy = 617186.1501403
if sideid == 1 then
targposy = 617186.1501403 - math.random(1000)
targposx = -241506.0936196 + math.random(1000)
end
if sideid == 2 then
targposy = 620402.6805932 - math.random(1000)
targposx = -244052.0036161 + math.random(1000)
end
local target = {}
target.x = targposx
target.y = targposy
target.radius = 1000
target.expendQty = 20
target.expendQtyEnabled = true
local fire = {id = "FireAtPoint", params = target}
groupname:getController():pushTask(fire)
return nil
end
Deus Ex did before Halo and I believe Unreal before that!
And the Xwing and Tie fighter games before that. You can use play-to to make sound files play on triggers. So if you want you can have Mozdok tower blast Tchaikovski as they scramble the alert fighters.
Like Franze, I know this has already been answered, but I had a thought. First of all, Iām by no means a DCS mission designer. That said, Iāve seen mentions of other designers de-spawning a unit and then re-spawning it when they need a behavior change, and also as a safeguard against the typical weird AI behavior. So perhaps you could have the artillery fire at the first target, then de-spawn them, and spawn a new set that fire at the next target. Less elegant but could work, and the player probably wouldnāt notice if they arenāt looking at them when it happens.