Minimum flyer height? [Solved]

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
kiprobin
First Lance Corporal
First Lance Corporal
Posts: 120
Joined: Wed Dec 11, 2019 3:52 pm
Projects :: Trench War
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Minimum flyer height? [Solved]

Post by kiprobin »

So I put a bunch of starfighters in my land map, and they all spawn in way above the ground, even though i put the spawn points on the ground in ZE. For this map, I actually lowered the ground to about -250, so that way I could make super high mountains with bf2's max height of 327 ish. When this started happening, I raised one of the fighters up a little in ZE, and lowered another one, while leaving the rest where I originally put them. I munged and ran the game, and the fighter I raised did indeed rise above the rest, floating even higher off the ground, but the fighter I lowered was still level with the fighters I left alone.
This leads me to believe that there is some minimum flyer height (only flyers - all my other vehicles work fine) preventing them from spawning below -200.
If this is the case, how would I change it? I see the max flyer height in the lua, but not the min flyer height. My map is nearing completion and it would be a total pain to redo the ENTIRE terrain 50 meters up just for these flyers spawning too high, so any suggestions would be appreciated
Last edited by kiprobin on Thu May 13, 2021 7:57 pm, edited 1 time in total.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Minimum flyer height?

Post by Teancum »

I feel like I ran into this issue before myself. I had to raise the height back up, although I don't recall how much.
kiprobin
First Lance Corporal
First Lance Corporal
Posts: 120
Joined: Wed Dec 11, 2019 3:52 pm
Projects :: Trench War
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Re: Minimum flyer height? [Solved]

Post by kiprobin »

Solved! And so simply I feel stupid for this even being a problem. Since there's the line:
SetMaxFlyHeight(400)

in the lua, I tried adding:

SetMinFlyHeight(-251)

right beneath it. It worked first time of asking. I feel stupid now haha. Also, by default the min fly height seems to be -200, though my experiment shows that it can clearly be lowered to at least -251
Post Reply