Page 1 of 1

LAU Trigger for mines cleared?

Posted: Sat Feb 08, 2020 7:01 pm
by BeirutDude
Has anyone written a LAU Script that triggers for a mine being cleared?

RE: LAU Trigger for mines cleared?

Posted: Sat Feb 08, 2020 9:00 pm
by Primarchx
I'm interested in this, too, though I'm looking for a mine being laid (ie an area with x number of mines laid in it as a trigger).

RE: LAU Trigger for mines cleared?

Posted: Tue Feb 11, 2020 3:56 am
by michaelm75au
This has come up before I think, but I can't recall specifics.
I think detecting a weapon (mine) event was the solution for detecting a minefield. And a weapon (mine) being destroyed event was to handle sweeping but that also could be triggered by a hit on a unit.
I will have a look in my notes to see if there is anything available under the current Lua structure for mines.

RE: LAU Trigger for mines cleared?

Posted: Wed Feb 12, 2020 9:03 pm
by BeirutDude
Thank you!

RE: LAU Trigger for mines cleared?

Posted: Sat Feb 15, 2020 12:15 am
by michaelm75au
I will need to delve deeper into this.
A mine is a 'weapon' waiting to fire at something, but they aren't 'housed' by another unit (shooter).

RE: LAU Trigger for mines cleared?

Posted: Sun Feb 16, 2020 1:06 pm
by SeaQueen
A mine is a 'weapon' waiting to fire at something, but they aren't 'housed' by another unit (shooter).

Yeah... I've wanted something like this one for a long time too. Personally, I'd like a LUA function which returns the number of mines in an area, and another one that places them. I want to use them to create victory condition scripts so I can add to people's score when, for example, "90% of the mines cleared from area A" or "B-52s drop quickstrike mines in the channel."

There's also something wonky going on with the dummy mines.

RE: LAU Trigger for mines cleared?

Posted: Mon Feb 17, 2020 3:43 am
by michaelm75au
I've added it to my list.[:D]

RE: LAU Trigger for mines cleared?

Posted: Tue Feb 25, 2020 4:14 am
by michaelm75au
Part 1 of this request:
giving designer some control over minefields
print('laying a minefield with delayed (6000 seconds) activation mines ...')
print(ScenEdit_AddMinefield( {side='usa', dbid=3398,number=50,delay=6000,area={'rp-777','rp-778','rp-779','rp-780'} }) )
print('what is in the minefield ...')
print(ScenEdit_GetMinefield( {side='usa', area={'rp-777','rp-778','rp-779','rp-780'} }) )
print('make a mine active in 300 seconds - command activated')
print(ScenEdit_SetMine({ side='usa', guid = ScenEdit_GetMinefield( {side='usa', area={'rp-777','rp-778','rp-779','rp-780'} })[11].guid, delay =300}))
print('show the mine details')
print(ScenEdit_GetMinefield( {side='usa', area={'rp-777','rp-778','rp-779','rp-780'} })[11] )
print('remove the minefield')
print(ScenEdit_DeleteMinefield({side='usa', area={'rp-777','rp-778','rp-779','rp-780'} }) )

RE: LAU Trigger for mines cleared?

Posted: Tue Feb 25, 2020 4:17 am
by michaelm75au
Output of above:
laying a minefield with delayed (6000 seconds) activation mines ...
14
what is in the minefield ...
{ [1] = { longitude = 42.9925537109375, type = 'Weapon_3398', latitude = 13.1310834884644, depth = -34.1135330200195, delay = 6000, guid = 'nzzyvj-0hltpo883gmvl' }, [2] = { longitude = 43.1289558410645, type = 'Weapon_3398', latitude = 13.1098747253418, depth = -123.979019165039, delay = 6000, guid = 'nzzyvj-0hltpo883gmvr' }, [3] = { longitude = 43.1371002197266, type = 'Weapon_3398', latitude = 13.1161909103394, depth = -81.0547256469727, delay = 6000, guid = 'nzzyvj-0hltpo883gn01' }, [4] = { longitude = 43.1045150756836, type = 'Weapon_3398', latitude = 13.1196670532227, depth = -74.3387451171875, delay = 6000, guid = 'nzzyvj-0hltpo883gn04' }, [5] = { longitude = 43.1800079345703, type = 'Weapon_3398', latitude = 13.105978012085, depth = -54.5076065063477, delay = 6000, guid = 'nzzyvj-0hltpo883gn07' }, [6] = { longitude = 43.156005859375, type = 'Weapon_3398', latitude = 13.0913848876953, depth = -55.2504272460938, delay = 6000, guid = 'nzzyvj-0hltpo883gn0d' }, [7] = { longitude = 43.1097564697266, type = 'Weapon_3398', latitude = 13.1530227661133, depth = -23.8217430114746, delay = 6000, guid = 'nzzyvj-0hltpo883gn0g' }, [8] = { longitude = 43.0214195251465, type = 'Weapon_3398', latitude = 13.1154127120972, depth = -46.8236923217773, delay = 6000, guid = 'nzzyvj-0hltpo883gn0j' }, [9] = { longitude = 43.130558013916, type = 'Weapon_3398', latitude = 13.1125354766846, depth = -78.3277587890625, delay = 6000, guid = 'nzzyvj-0hltpo883gn0p' }, [10] = { longitude = 42.9928741455078, type = 'Weapon_3398', latitude = 13.1360893249512, depth = -44.0967178344727, delay = 6000, guid = 'nzzyvj-0hltpo883gn0v' }, [11] = { longitude = 43.1687278747559, type = 'Weapon_3398', latitude = 13.1555738449097, depth = -26.8193244934082, delay = 6000, guid = 'nzzyvj-0hltpo883gn15' }, [12] = { longitude = 43.1552314758301, type = 'Weapon_3398', latitude = 13.1480493545532, depth = -10.3535003662109, delay = 6000, guid = 'nzzyvj-0hltpo883gn1b' }, [13] = { longitude = 43.1958312988281, type = 'Weapon_3398', latitude = 13.0780935287476, depth = -5.68701934814453, delay = 6000, guid = 'nzzyvj-0hltpo883gn1h' }, [14] = { longitude = 43.1914482116699, type = 'Weapon_3398', latitude = 13.1320991516113, depth = -33.198413848877, delay = 6000, guid = 'nzzyvj-0hltpo883gn1n' } }
make a mine active in 300 seconds - command activated
'Yes'
show the mine details
{ longitude = 43.1687278747559, type = 'Weapon_3398', latitude = 13.1555738449097, depth = -26.8193244934082, delay = 300, guid = 'nzzyvj-0hltpo883gn15' }
remove the minefield
14

RE: LAU Trigger for mines cleared?

Posted: Fri Feb 28, 2020 11:00 pm
by SeaQueen
Also, there's something weird about dummy mines. I can't place them.

RE: LAU Trigger for mines cleared?

Posted: Tue Mar 03, 2020 4:58 am
by michaelm75au
What is the DB # for these mines? I don't see any 'dummy mines' showing on the drop down for creating minefields.
Never mind, I can see the issue.

RE: LAU Trigger for mines cleared?

Posted: Tue Mar 03, 2020 11:19 am
by stilesw
Just an FYI, here is a list of all the mines in DB3K.
-WS


Image

RE: LAU Trigger for mines cleared?

Posted: Thu Mar 05, 2020 1:27 pm
by SeaQueen
Yay!!!!!

Dummy mines are basically the single most important kind of mine in the game.

Most of the time spent clearing mines is spent clearing things you think might be mines but actually aren't mines. Dummy mines represent that.

Re: LAU Trigger for mines cleared?

Posted: Wed Feb 14, 2024 8:58 pm
by Norm49
So this scrip create mine but what about detecting if the mine have been clear?