Jump to content

Recommended Posts

Posted
On 8/23/2023 at 7:50 PM, cfrag said:

As promised, I've created a "noGap"/"noGapGUI" script duo to DML that does what you suggest. Since it's now unit- rather than group based, it breaks compatibility with SSB and sittingDucks (who are group-based), but you now have the choice. The scripts are below for your tests (simply replace the stopGap scripts by these versions), and will be part of the next DML update

 

noGap.lua 13.25 kB · 0 downloads noGapGUI.lua 1.37 kB · 0 downloads

Thank you so much!

Posted (edited)
18 hours ago, cfrag said:

So how do you trigger flag 50? I see a 'local script' that I do not understand fully - that local function setFlag() seems iffy to me. When I trigger flag 50 via debugger or by adding a radioMenu it seems to work fine, no issues with RND. So I changed your script to 

t={}
function t.setFlag(val)
trigger.action.setUserFlag(val.flag, true)
end


local AddMobile= missionCommands.addSubMenu('Add Armor Column')
local Mob1= missionCommands.addCommand('Random Armour', AddMobile, t.setFlag, {flag= 50})
local Mob1= missionCommands.addCommand('Armor North BA75', AddMobile, t.setFlag, {flag= 51})
local Mob2= missionCommands.addCommand('Armour East BA81', AddMobile, t.setFlag, {flag= 52})
local Mob3= missionCommands.addCommand('Armour South BA40', AddMobile, t.setFlag, {flag= 53})
local Mob3= missionCommands.addCommand('Despawn Armour', AddMobile, t.setFlag, {flag= 59})


local subR = missionCommands.addSubMenu('Extra options')

local subN1 = missionCommands.addSubMenu('Restart Mission Options', subR)
local subN12 = missionCommands.addCommand('Cancel', subR, t.setFlag, {flag= 998} )
local subN22 = missionCommands.addCommand('Cancel', subN1, t.setFlag, {flag= 998} )
local subN2 = missionCommands.addSubMenu('Restart for sure?', subN1)
local subN3 = missionCommands.addSubMenu('Really sure you want to restart?', subN2)
local subN32 = missionCommands.addCommand('Cancel', subN2, t.setFlag, {flag= 998} )
local subN41 = missionCommands.addCommand('Cancel', subN3, t.setFlag, {flag= 998} )
local subN42 = missionCommands.addCommand('Start Day Mission', subN3, t.setFlag, {flag= 991} )
local subN42 = missionCommands.addCommand('Start Night Mission', subN3, t.setFlag, {flag= 992} )

and it seems to work. Do you see the same?

When i trigger flag 50, it runs the message attached to RND AC zone but it does not trigger flags 51 to 53 to spawn the armour units. Do you see the armoured units? When I trigger 51, 52 or 53 individually... the units spawn

image.png

Pardon the first line, I accidentally typed "-set flag 50" 😄

 

 

======
I seem to have found the issue. When I set the flag to trigger like this, it does not seem to give RND enough time to process the command
image.png

Setting it like this instead, seems to work every time.

image.pngnull

Edited by crispy12
Posted
54 minutes ago, crispy12 said:

When i trigger flag 50, it runs the message attached to RND AC zone but it does not trigger flags 51 to 53 to spawn the armour units.

Ah. I misread your message that you could not get flag 50 to trigger. Will have a look tomorrow, when I’m sober again 🙂

 

Posted (edited)

Looks like I have to re-type the entire post again because the message editor ate everything I wrote when I removed an image. Apologies, but I'm being a bit more brief now.

The reason why the RND did not trigger on flag "50" is because you are using radioTrigger to simply reset flag "50". In this mission, however, radioTrigger resets flag "50" before the Randomizer can read it, and never sees a change, hence it does nothing. The messenger, on the other hand, executed before radioTrigger, and saw the change, hence it printed out a message. This is called a "race condition", a very difficult situation to detect and that we should try to avoid. I have changed the radioTrigger in rc4 (I think) to set a DML flag (here "rndAC") on the rtOut! output to correctly trigger the randomizer

Enclose also please find the slightly modified mission that should now work for flag 50 by using a different flag to trigger (rndAC), and the other radioTriggers still need a similar treatment before the mission can work correctly

image.png

image.png

image.png

Syria Playground V4b.miz

Edited by cfrag
  • Like 2
Posted (edited)
4 hours ago, cfrag said:

Looks like I have to re-type the entire post again because the message editor ate everything I wrote when I removed an image. Apologies, but I'm being a bit more brief now.

The reason why the RND did not trigger on flag "50" is because you are using radioTrigger to simply reset flag "50". In this mission, however, radioTrigger resets flag "50" before the Randomizer can read it, and never sees a change, hence it does nothing. The messenger, on the other hand, executed before radioTrigger, and saw the change, hence it printed out a message. This is called a "race condition", a very difficult situation to detect and that we should try to avoid. I have changed the radioTrigger in rc4 (I think) to set a DML flag (here "rndAC") on the rtOut! output to correctly trigger the randomizer

Enclose also please find the slightly modified mission that should now work for flag 50 by using a different flag to trigger (rndAC), and the other radioTriggers still need a similar treatment before the mission can work correctly

image.png

image.png

image.png

Syria Playground V4b.miz 222.41 kB · 0 downloads

 

Yes this is what I figured as well. Similarly happens when I do the old school mission editor triggers - sometimes there is not enough time for another trigger to read the change. I see you already anticipated this way in advance because the radio module has the rtOut! function. But everything works now and I'm very happy - thank you!

Edited by crispy12
Posted
On 8/26/2023 at 4:52 AM, cfrag said:

That comment of yours gave me an idea for a new module that will be part of the next release. If you have the time and interest, have a look at the demo mission below. 'Airfield' zones can not only detect who owns the airfield (which a cloner can then use to determine the faction that the clones belong to, as seen in the demo), it also takes advantage of the newly released ability to set the ownership of an airfield by force (Lua script): see the radio menus that can set who Senaki belongs to (and then gets the cloner to spawn forces for the new owner).

I still have to test and document the module, but I'm hoping that the attributes are simple enough to decipher.

 

demo - airbase mine.miz 184.05 kB · 0 downloads

A very belated thank you!  I was on a trip over this weekend but I shall give it attention this week.  This may be exactly what I am looking for for the mission I'm creating.

  • 2 weeks later...
Posted

Version 1.4.3 - Functional Update - 20230907 

The temperatures where I live show no sign of relenting, so my terrace and grill are eternally beckoning. But I'm a geek, and I revel in coding challenges - and @Thunder Chicken22 managed to sneak one in by posing a great question that should be simple to solve in DML but wasn't: use airfield ownership in modules to drive action. Yeah, the solution that I came up with wasn't looking convincing to me either. 

image.png

So I went back and, with some help from a little known Spanish wine yard in the Rueda region, pondered better alternatives. This update contains a much better, and hopefully universally accepted, module 'airfield' which attaches itself to the nearest airfield (or FARP), generates signals when the airfield changes hands, and - much more importantly - can force ownership of the airfield any time you need it. Oh, and it provides the currently owned faction of the airfield as an output that you can feed directly into a cloner so that the cloned units belong to the faction that owns the airfield.

image.png

The results are impressive indeed:

image.png

The rest are minor changes under the hood, with the most important one being cfxZones picking up the ability to handle the <coa: flag/unit/zone> wildcard. Since it's the "zones" module that received the update, messenger and most other 'talking' modules (e.g. Valet and Recon Mode) inherit that ability as well.
 
Changes in Detail:

Manual 
    Main 
        - Airfield (new)
        - Changes to modules 
        - No Gap No Problem demo 
        - No Gap No Glory (update)
        - Airfield Mine demo
        
    Quick Reference 
        - Airfield 
        
Demos 
    - No Gap No Problem (update)
    - No Gap No Glory (update)
    - Airfield mine (new)

Modules 
    - Airfield 1.0.0 
        - Initial release
        
    - cfxZones 4.0.3 
        - process dynamic coalition wildcard 
        
    - cloneZone 1.8.2
        - Quad zone support 
        
    - dcsCommon 2.9.3
        - filter airbases according to category list 
    
Enjoy, 

-ch

  • Like 3
Posted

So I ran into a issue when attempting to control a clone zone with a changer.  What I'm trying to do is similar to the airfield issue, basically when all the units in a faction's specified zone are destroyed, I want to shut off a cloner.    The cloner has a delay timer associated as well as a pulser for the initial clone cycle delay.  Idea being that I want the cloner to start spawning units after a specified delay after a mission starts. Then after each time those units are destroyed, there is a different, randomized delay between spawn cycles.  Now what I am attempting to do is after the mission starts, what I called a Kicker zone fires a signal to the Randomizer zone to choose one of the two clone zones.  Thence after those units are destroyed, the delay timer waits a certain randomized time and fires a signal for the next clone cycle. This signal must pass through the Switch zone to get to the Randomizer.  The Switch checks the Occupied Zone to ensure that there are the specified units still in its zone.  If yes, it sends a changeOut! flag signal to the randomizer, otherwise it shuts off. 

I am getting the error message continuously streamed after mission start up stating that I am missing a flag signal of some sort. So I am confused what it is looking for specifically and I realize that I am missing something in the Switch zone but it isn't clear to me what exactly I am missing.  I am also wondering if I am approaching this correctly so any input is appreciated.

switch_cloner.png

Posted (edited)
On 9/10/2023 at 10:47 PM, Thunder Chicken22 said:

I am getting the error message continuously streamed after mission start up stating that I am missing a flag signal of some sort.

This is one of DML's inner QoL functions that is designed to alert us if it's expecting something that is not there. I've tried to re-create the issue with the images that you kindly provided, but I'm unable to get the warnings (i.e. everything *looks* fine). Can I trouble you to PM the mission to me (with mods removed) so I can have a more deeper look? I'm sure we can resolve this quickly.

EDIT:
The issue's root cause was isolated as an older, not up-to-date version of the changer module that was accidentally being used in the mission. Remedy was to replace it with the up-to-date version from the DML library.  

Edited by cfrag
Posted

Good afternoon to all and thanks cfrag for this incredible work im loving it so far.

I have a big noob question but im very new to scripting or DML.

Im creating a Training map for my squadron and if created a dog fight area, with the clone module and works no problem at all.

The plane spawns, does the dog fight and if it survives lands at Sochi, but after it does not despawn.

To keep the mision clean Im trying to set a wiper in the airport of Sochi so all the unit named DOG-Fight that land or come close to Sochi get erased or despawned.

The wiper name is wiperConfig

Then:

wipe?

verbose / true

wipeNamed / DOG-Fight*

 

But the debugger says I need a Flag or a trigger. "Getflag has none flag name"

 

I would love it to be like a timer or another better method, is that posible? Or do I need to create a Loop timer flag?

Thanks for the help

 

 

 

Posted
11 hours ago, negrete said:

To keep the mision clean Im trying to set a wiper in the airport of Sochi so all the unit named DOG-Fight that land or come close to Sochi get erased or despawned.

The wiper name is wiperConfig

That is a very unfortunate name for a wipe zone - it is the exact name of the trigger zone that is used to configure all wipers on your map. I recommend that you choose a different name for the wipe zone, perhaps "wipe zone Sochi"

11 hours ago, negrete said:

wipe?

verbose / true

wipeNamed / DOG-Fight*

If possible, please post a screenshot of the attributes in the zone, as that could help to make things more clear to me. From what I see here is that you do not provide a name for the flag that you are using to tell wiper to perform a wipe cycle - what flag are you connecting to the "wipe?" input? How are you triggering the wiper? The debug message that you are receiving appears to indicate exactly that: that you do not tell wipe? which flag to look for.

  • Thanks 1
Posted

Hi Cfrag

Thanks a lot for the help and inspiration I think if solved it. I dont know if its the best way but it did work. Here is how I set it up:

Wipe zone.jpgTrigger.jpg

The wiper config trigger zone I only have the debug.

The question I have and had a bit of trouble had to look inside the wiper.lua is the name "wipeCategory" that in the docs is different "category
wiperCat" dont know if its correct also but for me it did not work with the last name of the docs.

And sorry for bothering but I have another question, could it be posible to set like an Arena so enemy planes dont leave a certain areas just in case the AI do funny things?

Thanks for all the help.

Posted
3 minutes ago, negrete said:

The question I have and had a bit of trouble had to look inside the wiper.lua is the name "wipeCategory" that in the docs is different "category
wiperCat" dont know if its correct also but for me it did not work with the last name of the docs.

It should be "category", "wipeCat" or "wipeCategory". Wiper can use either of those three synonyms to specify the category of objects that should be wiped. Since you intend to wipe units, the value for this attribute should be "1" or "unit", just like in your mission right now (it looks to be correct)

  • Thanks 1
Posted

Ok thanks for the aclaration Cfrag cause on the docs its a bit confusing.

I have managed to make like an Arena area with 2 trigger areas, and it works. And im starting to learn a bit about named flags this was new to me Im quite old school.

Just a little question about the wiper above. If made a old school trigger type with the numbered flags, but could it be done with a pulse?

Idea: When enemy plane named Dog1 enters a certain area it produces a pulse flag that triggers the wiper and resets it. thanks again

Posted (edited)
42 minutes ago, negrete said:

Idea: When enemy plane named Dog1 enters a certain area it produces a pulse flag that triggers the wiper and resets it.

That would work, I guess, but it's not really necessary. By default, DML modules react to *changes* on a flag, not specific values. So with DML you usually do not need pulses, the modules simply click together. Perhaps try adding a unitZone to the Sochi airfield that triggers the wiper whenever an AI plane lands there to wipe it by connecting the enterZone! output from the unitZone to the wipers wipe? input. 

Edited by cfrag
  • Thanks 1
Posted
55 minutes ago, negrete said:

And im starting to learn a bit about named flags this was new to me Im quite old school.

Once you get used to it, as long as you use good descriptive names, it's MUCH easier than using numbers.

ONE WATCHOUT: names are case sensitive and it's easy to miss a capital (i.e. "Wiper" DOES NOT EQUAL "wiper") or make a typo, so if something isn't working double check your names.  Especially easily to mess up if you have an l (lower case L) next to an I or i (upper or lower case i).  Benefits more than outweigh downsides though.

  • Thanks 1
Posted

Version 1.4.4 - functional update - 20230921

This update brings a small, cosmetic new feature to stopGap (both stand-alone and DML): the ability to 'refresh' all those static player stand-in aircraft. It's purely cosmetic, and it helps to make long-running server-based missions look even better, as those static objects tend to accumulate detritus and damage over time. 

image.png

Also, new wildcards have become available for all text output capable modules (messenger, valet, radioMenu, ...) that now allow you to use the value of thags to be interpreted as two different world, like "dead" and "alive" or "inside" and "outside", etc. See "messenger's" description for details, I'm sure some of you will appreciate the new possibilities.

And finally, unitZone has received a full update with new, smarter abilities and a simpler, more refined ME interface.


All Changes

Manual
    Main
        - StopGap new option 'refresh'
        - My Immortal demo 
        - Updates to wildcard 
        - Updates to unitZone 
        
    Quick Reference
        - Updates to wildcards 
        
Demos
    - My Immortal (StopGap refresh) (new)

Modules
    - cfxZones 1.2.6
        - dynamicAB wildcards 
        - dynamic value wildcards 
    
    - duel (still experimental)
        - changes under the hood
        
    - StopGap standalone 1.0.9
        - refresh option (code setting)
        
    - StopGap 1.0.9
        - refresh config option 
        
    - unitZone 2.0.0
        - DML Zones OOP update 
        - lookFor defaults to "*"
        - "*" option to match all 
        - more synonyms
        - unitZone keyword attribute now also defines coalition 
        
Enjoy,

-ch

 

  • Like 1
Posted

Hi Cfrag

Sorry to bother you again but the more y use DML the more questions come out. Sorry.

I have a little doubt, In my missions y use Sky net IADS for the SAM sites. Do you know if its posible to spawn a group with a cloner or similar and still apply a script to that unit?

Thanks

Posted (edited)

Hi again Cfrag and sorry for bothering another time.

I have set in this training mission a SAM site that can spawn randomly in diferent locations, Up to there is all fine, but the problem is it does not erase the previous spawn. If tried with prewipe in the original cloner of the SAM and in the different sites (have 5 sites), and it works if it spawns in the same spot but not if its in another.

Here is a image with all the areas and I attach the mission but it uses the mod of range objects:DML-Random.jpg

Should I do it with wipers or there is another options? Thanks for all the help.

Academia-Caucaso-Range.miz

Edited by negrete
Posted (edited)

I believe that the reason your setup doesn't work the way you want is because each cloner only wipes whatever they cloned last when they get the signal on "clone?". So, eventually, a all SAM sites will wipe, one after the other, when they get a signal to clone, and they will wipe what they cloned before. 

You, however, seem to want want all SAM sites wipe whatever they collectively cloned last when only one of them is cloning. So let's break the solution apart:

Can you tell a cloner to wipe their last clone? Yes, that is the 'wipe?' input. It makes a cloner wipe whatever they cloned last. Now, you want to send this signal to all cloners in your group of possible cloners to wipe before you proceed to tell one of them (through the randomizer) to clone. Do you already have a signal to do so? Yes you do - although you probably do not realize that you do 🙂

The Randomizer that randomly selects flags 600 through 604 is activated by the "Sam1" flag. This is exactly the signal to tell all SAMs connected to that Randomizer to erase their last clones.

So, my suggestion is to add a "wipe?" input to the SAM sites that are cloned by the flags 600-604, and connect "Sam1" (the flag that activates the Randomizer) to the "wipe?" input. So by activating the Randomizer, you also cause all previous clones from the cloners that are activated by flags 600-604 to wipe their last clone. 

Does that do the trick? 

Edited by cfrag
  • Thanks 1
Posted

Thanks a lot Cfrag, your a genius, sorry did not read this in the documentation:

deSpawn?
deClone?
wipe?

Observes the flag <Name> for a change. Each time the flag’s value changes, all units (including static objects) that are still alive from the previous spawn are removed from the game.

Works like a charm, starting to learn DML its truly amazing.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...