Change aircraft cruisealt (or lock it to a height) on a map

Change aircraft cruisealt (or lock it to a height) on a map

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Change aircraft cruisealt (or lock it to a height) on a map

Post by Beherith »

Hi guys, Im wondering if its possible on a map to make the aircraft not go below a certain height. The heightmap has insanely steep and deep cliffs separating the land masses, and I dont want aircraft to go low and crash into cliffs and behave bad.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by smoth »

or clip through the cliffs :\.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by Forboding Angel »

Umm there is some variable that was added to control aircraft ascension and descent speed, you could set that to a super high number. Additionally, if the plane has maxaccel=0.3; it should deal with them pretty well, but if you're making this map for BA, fogeddaboudit.

Sry :-/
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by smoth »

they will still clip into terrain on aproach. It also fucks with bombing runs etc... I wish we could set a true level of flight.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by Regret »

Better solution would be to be able to define "(3D) playable area(s)" on a map, everything else would be for decoration only.

f.e. making hills in the background etc.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by JohannesH »

Regret wrote:Better solution would be to be able to define "(3D) playable area(s)" on a map, everything else would be for decoration only.

f.e. making hills in the background etc.
Planes can still get off-map, on purpose or accidentally, and if the height differene is big enough they cannot be shot while there and can bug when coming out.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by smoth »

Regret wrote:Better solution would be to be able to define "(3D) playable area(s)" on a map, everything else would be for decoration only.

f.e. making hills in the background etc.
I don't understand, more details please.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by Regret »

smoth wrote:I don't understand, more details please.
Units being able to exist only in given area of the map, everything else is treated as non-playable, as in beyond the map edge.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by SinbadEV »

Regret wrote:
smoth wrote:I don't understand, more details please.
Units being able to exist only in given area of the map, everything else is treated as non-playable, as in beyond the map edge.
planes already can fly outside of the map in certain situations so wouldn't really help...
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by jK »

there is a modinfo tag to disallow planes to leave the map
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by BrainDamage »

can't engine airplane flight behaviour be changed instead to "look ahead" along direction of order, look for max height + some constant ( cruise altitude? ) and make an interpolation from current position so it starts raising altitude from far distance rather than after literally colliding with the hill?
mongus
Posts: 1463
Joined: 15 Apr 2005, 18:52

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by mongus »

What you do when the plane changes direction. or is given 10 confusing destination orders.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by Beherith »

Goddamn forum ate my post again, so here goes.

Take a look at the gadget in my map TMA-0, it has an allowcommand callin, which disallows giving commands outside the asteroid boundaries, its extremely simple and highly customizable for all kinds of weird map shapes. For most purposes its as good as defining an arbitrary shape for the map (how it would handle concave shapes is left as an exercise for the reader).

Actually, I will be using that as well, since I realized that I'm only going to be realistically get surround meshes on my maps if I make the map itself bigger, and restrict the camera and the command able area.

I definitely have to touch the camera, since scrolling and having the view drop into 2000 elmos deep chasms is probably very annoying.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by Regret »

Beherith wrote:I definitely have to touch the camera, since scrolling and having the view drop into 2000 elmos deep chasms is probably very annoying.
Map touching camera???? Are you crazy?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Change aircraft cruisealt (or lock it to a height) on a map

Post by AF »

Its a general camera fault, one he should never have had to think about.
Post Reply

Return to “Lua Scripts”