LAU Trigger for mines cleared?

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
User avatar
BeirutDude
Posts: 2799
Joined: Sat Apr 27, 2013 9:44 am
Location: Jacksonville, FL, USA

LAU Trigger for mines cleared?

Post by BeirutDude »

Has anyone written a LAU Script that triggers for a mine being cleared?
"Some people spend an entire lifetime wondering if they made a difference. The Marines don't have that problem."
PRESIDENT RONALD REAGAN, 1985

I was Navy, but Assigned TAD to the 24th MAU Hq in Beirut. By far the finest period of my service!
User avatar
Primarchx
Posts: 1954
Joined: Sun Jan 20, 2013 9:29 pm

RE: LAU Trigger for mines cleared?

Post 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).
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LAU Trigger for mines cleared?

Post 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.
Michael
User avatar
BeirutDude
Posts: 2799
Joined: Sat Apr 27, 2013 9:44 am
Location: Jacksonville, FL, USA

RE: LAU Trigger for mines cleared?

Post by BeirutDude »

Thank you!
"Some people spend an entire lifetime wondering if they made a difference. The Marines don't have that problem."
PRESIDENT RONALD REAGAN, 1985

I was Navy, but Assigned TAD to the 24th MAU Hq in Beirut. By far the finest period of my service!
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LAU Trigger for mines cleared?

Post 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).
Michael
User avatar
SeaQueen
Posts: 1432
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: LAU Trigger for mines cleared?

Post 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.
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LAU Trigger for mines cleared?

Post by michaelm75au »

I've added it to my list.[:D]
Michael
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LAU Trigger for mines cleared?

Post 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'} }) )
Michael
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LAU Trigger for mines cleared?

Post 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
Michael
User avatar
SeaQueen
Posts: 1432
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: LAU Trigger for mines cleared?

Post by SeaQueen »

Also, there's something weird about dummy mines. I can't place them.
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LAU Trigger for mines cleared?

Post 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.
Michael
User avatar
stilesw
Posts: 1572
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: LAU Trigger for mines cleared?

Post by stilesw »

Just an FYI, here is a list of all the mines in DB3K.
-WS


Image
Attachments
Mines.jpg
Mines.jpg (147.91 KiB) Viewed 905 times
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
User avatar
SeaQueen
Posts: 1432
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: LAU Trigger for mines cleared?

Post 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.
Norm49
Posts: 95
Joined: Fri Jun 05, 2015 3:59 pm

Re: LAU Trigger for mines cleared?

Post by Norm49 »

So this scrip create mine but what about detecting if the mine have been clear?
Post Reply

Return to “Lua Legion”