-
Posts
71 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
They do start to attack by default, BUT there is a switch in the core of DCS called RED ALERT. You can set it ON or OFF at mission start through the unit’s Advanced Waypoint Actions in mission editor. If Red Alert is ON, the unit starts the mission fully ready to fire. If Red Alert is OFF (which is the default), it will only become active once an enemy unit is in line of sight. For example, a SHORAD system might need around 40 seconds (just an example) to deploy its radar and prepare to fire. So if Red Alert is OFF, once it detects an enemy it begins that deployment sequence and will fire only after those 40 seconds. If Red Alert is ON, the unit spawns already deployed and immediately ready to fire.
-
kira_mikamy started following Static Object coalition mismatch
-
Hi, I may be missing something here, but I noticed what seems to be a coalition inconsistency affecting some static objects. If certain static objects (for example an Oil Rig or a FARP (helipad) ) are placed under the Red coalition in the Mission Editor, they appear red at mission start. However, if any Blue unit approaches them during gameplay, their F10 map icon switches to Blue, as if the object had been captured. The issue: In the detailed info panel, the object’s coalition remains Red, even though the icon visually shows it as Blue. This means scripts relying on coalition checks (e.g., Object.getCoalition() or similar) still see the object as Red, making capture detection unreliable. This behavior occurs with at least the Oil Rig and FARP (helipad) , and it’s possible other static or capturable objects may behave the same way. I’m not sure if this is already known, but it seemed worth reporting.
-
after you had create the drone in mission editor and named it as example "DRONE_TEMPLATE" (the GROUP name) you can use MOOSE and declare just remember that moose ad a #001 at the end of the group name after the spawn, this function will check every 5 minutes (300seconds) if a group named SPAWNED_DRONE#001 exist. if exist, nothing happen. if not exist (destroyed or not yet spawned) it will spawn one. the drone will spawn in the place where its placed in missione editor and follow his waypoint every time function IS_DRONE_ALIVE() if not Group.getByName("SPAWNED_DRONE#001") then DRONE_SPAWN = SPAWN:NewWithAlias("DRONE_TEMPLATE", "SPAWNED_DRONE"):Spawn() end end local timer_DRONE = TIMER:New(IS_DRONE_ALIVE):Start(300, 300)
-
I suggest using MOOSE if you need to handle complex trigger logic. I’ve completely stopped using the Mission Editor’s built-in triggers..they’re just poorly designed. Anyway, a Lua Predicate condition must return either true or nil to be considered valid. It simply executes the scripting engine code written in the text box. The code must include the statement return true for the condition to evaluate as true , that’s basically it. For example: return timer.getTime() > 300 This means the trigger will activate once 300 seconds have passed since the mission started. In short, it’s a way to create conditions that don’t exist natively in the Mission Editor. But be aware: this method checks the condition every second, so it can become a performance killer if you run complex calculations. In that case, it’s better to use MOOSE with a scheduler instead.
-
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 missile
kira_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 contested
kira_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 trigger
kira_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 nil
kira_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 nil
kira_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
