- 
                Posts66
- 
                Joined
- 
                Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
- 
	As far as I know, it’s not possible. Not even through scripts.
- 
	In a S_EVENT_HIT event, the event.initiator can sometimes be the ammunition object instead of the firing unit. Since ammunition objects don’t have a getName() method, calling it directly will return nil. To avoid this, you need to check that the initiator is a valid unit before trying to get its name. This can be done by verifying its object category.
- 
	  Can't make AI launch cruise missilekira_mikamy replied to Elisei Posudnevskii's topic in Mission Editor he need a bombing task probably. i have a b52 that launch cruise without any problem but i use moose not mission editor: CONTROLLABLE:TaskBombing Also: the purpose of the AI aircraft's "Reconnaissance" task in DCS it tells the AI that this flight is performing a recon mission, not a combat or transport mission. This affects formation behavior, radio chatter, and ROE (Rules of Engagement) defaults, but does not automatically cause it to detect or report targets. Recon AI flights tend to avoid combat and may maintain altitude and distance rather than engaging You can make the “Reconnaissance” task mean something by combining it with triggers or Lua scripting.
- 
	cribob ctld is a bit outdated, better move to moose ctld. anyway, if you want to copy paste your code i can take a look on it, it was some year last time ive used cribob ctld
- 
	  Trying to make a reseting timer when an airdrome is contestedkira_mikamy replied to SXL_Deej's topic in Mission Editor Hi! You should be able to solve it by adding a trigger that uses "Time Since Flag" together with "Coalition Has Airdrome" as conditions. Since you already have a trigger that activates Flag 1 when Red captures the base, you just need to add a "Time Since Flag 1" = 600 seconds condition combined with "Coalition Has Airdrome = Red". This way, the trigger will only fire after Red has controlled the airbase for 10 minutes. If Blue captures it in the meantime, Flag 1 turns off and the timer resets automatically. Since the trigger is set to Switched Condition, it will start counting again if Red recaptures the airbase later. You can do exactly the same logic for Blue, just reversed. Let me know if this works for you
- 
	Mike Force Team started following kira_mikamy
- 
	  removing deployed CTLD troops via a triggerkira_mikamy replied to toro 6's topic in Scripting Tips, Tricks & Issues You can’t use a Mission Editor trigger to remove a group because the groups spawned dynamically don’t exist in the Mission Editor. You need scripting for this. MOOSE is likely the best option: you can use a SET_GROUP combined with FilterPrefixes. For example, every group spawned via CTLD can have the same prefix in their name. Then you can use ForEachGroup to destroy all of them, or just a specific one or more within a trigger zone.
- 
	  Functions of the Unit.get * class return nilkira_mikamy replied to Qazplm's topic in Scripting Tips, Tricks & Issues Can you use MOOSE? If not, I recommend moving to it. MOOSE has a function called SpawnNewWithAlias that lets you spawn a group from a Mission Editor template and give it any name (alias) you want each time you spawn it. https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Spawn.html##(SPAWN).NewWithAlias
- 
	  Functions of the Unit.get * class return nilkira_mikamy replied to Qazplm's topic in Scripting Tips, Tricks & Issues Unit.getByName("Tank") → here "Tank" must be the Unit name, not the Group name. Group.getByName("Tank") → use this only if the Group is named "Tank" in the Mission Editor. I’m guessing the issue is that your unit might already be named "Tank". If that’s the case, let me know so we can fix it properly.
- 
	Knowing Lua is definitely a plus, but it’s not super essential when you’re just getting started. Once you understand when to use things like an if statement or a for loop, you’re already halfway there. Of course, deeper Lua knowledge will speed up your workflow and open more possibilities over time. I started scripting in DCS without actually knowing Lua..I began by using only MOOSE. Then Lua came naturally as I progressed, and now I have no issues working with any type of script. Still, I prefer using MOOSE for DCS rather than relying on the native APIs. P.S. Judging by your name, I guess you’re Italian (I am too). Not sure if I can say this here, but if you want, look for “DCS ITALIA” on Discord, we can get in touch there in the future.
- 
	use a math.random and set the flag trough trigger.action.setUserFlag https://wiki.hoggitworld.com/view/DCS_func_setUserFlag
- 
	Red Alert behavior is a built-in feature. Normally, Red Alert activates automatically when a unit detects a target (either by radar or visually). This state causes the unit to prepare for engagement by deploying all available systems, such as radars, launchers, and other assets. If you manually set Red Alert in the Mission Editor, it simply skips the warm-up phase. Additionally, an ammo truck nearby can rearm systems like MLRS units. The rearming process usually takes around 30–40 seconds, and you can actually observe each missile being loaded during that phase.
- 
	You can use MOOSE events to catch when a Dynamic Cargo is loaded or unloaded: MOOSE Docs – OnEventDynamicCargoUnloaded However, this approach has a drawback: all types of Dynamic Cargo will be processed, so you’ll need multiple if conditions to check for the correct delivery zone and the specific cargo models. A much cleaner method is to use MOOSE SET_CARGO: Apply filters to select the cargo types you want to track. Use :ForEachCargo() to iterate over the active cargo objects. For each cargo, check with :IsInZone() whether it’s inside the target zone. If it is, increment a counter (counter = counter + 1). This way, you can implement logic such as: if counter >= 10 then -- build FARP end Remember to reset the counter every time you call the function to avoid counting the same cargo multiple times.
- 
	  Spawned Farp doesn't refuel/rearmkira_mikamy replied to Fabiano-VIKING's topic in Scripting Tips, Tricks & Issues Yes, if you need the ground crew, adding just one Humvee is enough. I did the same thing years ago, I guess you’re using Cribob’s old CTLD. I’d recommend switching to the MOOSE one so you can do cooler stuff, but in any case just adding a Humvee will be enough.
- 
	Alright, if you want to achieve this without using scripts and only through the Mission Editor's triggers, I recommend posting in the Mission Editor section of the forum to get more precise answers. That said, I haven't used triggers in a long time myself — I prefer scripting with things like MOOSE — but I believe you can achieve something similar using the "Triggered Actions" tab (on the right side of the group’s settings) when you select the helicopter. Set a task as "Land", then click on "Stop Condition". In these stop conditions, you can specify something like "when Flag X is true". Now, create a trigger that fires after 1 second using "AI Task Push", and select the "Land" task you just created. Then, set Flag X to activate when one of the pilots takes off, so the helicopter will stop the "Land" task and continue with its flight plan. Side effect: At the beginning of the mission, the helicopter will take off, but after 1 second it will be ordered to land at the point you defined in the "Land" task. If you don't strictly need the aircraft to stay on the ground from mission start, and it's acceptable for it to take off for 20 seconds before landing, this can work.

 
            
         
	 
					
						 
                    