Page 1 of 1

GetMinefield question

Posted: Sat Apr 11, 2020 4:07 pm
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

RE: GetMinefield question

Posted: Sat Apr 11, 2020 7:53 pm
by Whicker
you forgot 'a' after local? and lowercase l for local.

RE: GetMinefield question

Posted: Sun Apr 12, 2020 1:14 pm
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

RE: GetMinefield question

Posted: Sun Apr 12, 2020 3:22 pm
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