GetMinefield question

All discussions & material related to Command's Lua interface

Moderators: michaelm75au, angster, RoryAndersonCDT, MOD_Command

Post Reply
User avatar
Gunner98
Posts: 5973
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

GetMinefield question

Post by Gunner98 »

Testing out the 'ScenEdit_GetMinefield' function

Either I'm not doing it right or it may not be working properly - probably the former.

Tried the function from both sides, obviously the side owner should be the side showing the mines but in both cases I'm getting an 'nil' for a return.

Can you point me in the right direction please?

Tx

Image
Attachments
Getminefield.jpg
Getminefield.jpg (72.02 KiB) Viewed 181 times
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

RE: GetMinefield question

Post by Whicker »

you forgot 'a' after local? and lowercase l for local.
User avatar
Gunner98
Posts: 5973
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: GetMinefield question

Post by Gunner98 »

Once again - Doh!

That worked.
{ [1] = { type = 'Weapon_2420', guid = 'c25c74ed-e54a-4346-835b-831641171086', delay = 0, depth = -109.68620300293, longitude = 43.3588752746582, latitude = 12.6022644042969 }, [2] = { type = 'Weapon_2420', guid = '43390cde-4e75-4165-9466-01c53b45b6d8', delay = 0, depth = -25.8526020050049, longitude = 43.2616386413574, latitude = 12.6186656951904 }, [3] = { type = 'Weapon_2420', guid ...

Thanks
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
User avatar
Gunner98
Posts: 5973
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: GetMinefield question

Post by Gunner98 »

OK - taking me a while to get back into this but this works - it's not much but is a minor victory


local a = ScenEdit_GetMinefield({side='Houthi Rebels', area={'RP-727','RP-728', 'RP-729', 'RP-730'} } )
local b = 0

if a ~= b then
ScenEdit_SpecialMessage('USA','They have mines')
end
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Post Reply

Return to “Lua Legion”