Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Terrain type. Obtain with LUA?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Terrain type. Obtain with LUA? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Terrain type. Obtain with LUA? - 11/17/2019 2:02:10 PM   
Bandura1

 

Posts: 16
Joined: 12/11/2016
Status: offline
it is possible to obtain terrain of unit location?

Any code similar to World_GetElevation (location) but to terrain type.

Thanks.
Post #: 1
RE: Terrain type. Obtain with LUA? - 11/17/2019 11:30:07 PM   
KnightHawk75

 

Posts: 198
Joined: 11/15/2018
Status: offline
Great question.

(in reply to Bandura1)
Post #: 2
RE: Terrain type. Obtain with LUA? - 12/2/2019 7:15:10 AM   
michaelm75au


Posts: 12532
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
Has been added to the request list

_____________________________

Michael

(in reply to KnightHawk75)
Post #: 3
RE: Terrain type. Obtain with LUA? - 12/5/2019 2:19:34 AM   
tjhkkr


Posts: 2402
Joined: 6/3/2010
Status: offline
quote:

ORIGINAL: Bandura1
it is possible to obtain terrain of unit location?
Any code similar to World_GetElevation (location) but to terrain type.
Thanks.


What a fantastic idea!


_____________________________

Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.

(in reply to Bandura1)
Post #: 4
RE: Terrain type. Obtain with LUA? - 12/9/2019 11:59:26 PM   
michaelm75au


Posts: 12532
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
Note on new Lua method:

quote:


Sea
print(World_GetLocation({latitude='-16.4183855919871', longitude='111.506732704337'}))
{ altitude = -4937, cz = { 4 = 96, 1 = 24, 2 = 48, 3 = 72 }, layer = { strength = 0.61, ceiling = -123, floor = -207 } }


Land
print(World_GetLocation({latitude='51.5052833557129', longitude='-2.27636313438416'}))
{ slope = 0, cover = { value = 12, text = 'Land: Croplands ' }, altitude = 128 }



Additional table items may be added later.
---
It is basically trying to show the details available in the cursor block from the map.

< Message edited by michaelm75au -- 12/10/2019 12:03:59 AM >


_____________________________

Michael

(in reply to tjhkkr)
Post #: 5
RE: Terrain type. Obtain with LUA? - 12/10/2019 6:55:20 PM   
Bandura1

 

Posts: 16
Joined: 12/11/2016
Status: offline
Thanks

(in reply to michaelm75au)
Post #: 6
RE: Terrain type. Obtain with LUA? - 12/12/2019 2:25:11 AM   
KnightHawk75

 

Posts: 198
Joined: 11/15/2018
Status: offline
Thanks for this very useful addition.

(in reply to Bandura1)
Post #: 7
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Terrain type. Obtain with LUA? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.109