Get the x,y,z location of a Region

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
DarthRubik
Recruit Womprat Killer
Posts: 8
Joined: Tue Dec 29, 2015 11:22 pm
Projects :: Capital Ship One
Games I'm Playing :: SW BF II

Get the x,y,z location of a Region

Post by DarthRubik »

Is it possible to get the the x,y,z location of a Region via a lua script? Looking at the documentation, it does not look like this is possible, but maybe someone knows some trick that is not in the documentation?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Get the x,y,z location of a Region

Post by Marth8880 »

Nope.
LRKfm946
Master Sergeant
Master Sergeant
Posts: 163
Joined: Sun Feb 02, 2014 6:13 pm
Projects :: Battlefront II Hunger Games
Games I'm Playing :: SWBF2 BF3
Contact:

Re: Get the x,y,z location of a Region

Post by LRKfm946 »

You could try GetWorldPosition, but idk if that works for regions. Otherwise you could put an (invisible) object at the same location as the region and use GetWorldPosition on that.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Get the x,y,z location of a Region

Post by Marth8880 »

LRKfm946 wrote:You could try GetWorldPosition, but idk if that works for regions.
The only valid input types for GetWorldPosition are object and entity. With that said, yeah, you could always just do what Kfm said with the invisible object.
Post Reply