Aircraft landed and shooting
Moderator: Moderators
Aircraft landed and shooting
How do we control aircraft land behaviour? I mean for instance that fighters can land and still shoot at enemies. Is there some unitdef tag that controls this?
It's not always a good thing, fighters become very op when they can do this.
It's not always a good thing, fighters become very op when they can do this.
-
- Posts: 1398
- Joined: 17 Sep 2008, 04:36
Re: Aircraft landed and shooting
You can likely control it through the animation script. Something like not returning any fire points when the unit is below a certain height above the land.
Re: Aircraft landed and shooting
But that's a complicated solution. I observe that ba has fixed this by reducing the los of fighters (while keeping their air-los high)
Re: Aircraft landed and shooting
Normally it's just "hope that nothing enters the firing cone while the fighter is landed" because they use non-turret weapons.
Re: Aircraft landed and shooting
I like when they land in front of their target and then shoot it to death. By like, I mean, I laugh at the bug.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Aircraft landed and shooting
Afaik this was never 'fixed' in BA or ever even thought of as a bug. Personally I have no strong feeling for or against it happening. If you want them not to fire while landed then I'd also say the unit script is the natural place.
Re: Aircraft landed and shooting
Considering the unit script knows its id and that means no loop in game frame no table to maintain on create/death!
Re: Aircraft landed and shooting
I thought this was a new thing, I don't remember that it happened before. But if it has matured into a feature then I think we can live with it.
Personally I'm not that good with cob and there is no code at the moment that handles targetting in the script, that i know of. So it's maybe easier to adjust the cones and the los radiuses anyway, especially since fighters maybe do not need large those anyway.
Personally I'm not that good with cob and there is no code at the moment that handles targetting in the script, that i know of. So it's maybe easier to adjust the cones and the los radiuses anyway, especially since fighters maybe do not need large those anyway.
Re: Aircraft landed and shooting
I am personally bothered by the fact that anything still uses cob.
Re: Aircraft landed and shooting
Why? It's faster than lua and it can be compiled.
Re: Aircraft landed and shooting
Citation needed.Jools wrote:Why? It's faster than lua and it can be compiled.
Re: Aircraft landed and shooting
smoth wrote:I am personally bothered by the fact that anything still uses cob.
Jools wrote:Why?
- It doesn't have to be compiled.
- which gives it the ability to be updated with luarules reload instead of being forced to restart spring with each change
- which removes the need to use the antiquated scriptor
- It has access to waaaaaaay more than a cob script.
- so you can do a LOT more with them due to acess to spring that cob simply does not have access to.
- It is able to do more intelligent things like reading the unitdef, allowing me to do the generalized script which was near impossible with cob
- it is lua instead of the exceptionally limited bos
Re: Aircraft landed and shooting
It's not speculation, if I would speculate I would go to the stock market. Speculation is the wrong word. It's an unverified hypothesis.
However, it's logical to assume that compiled things are faster than things done in run-time. To me it sounds counter intuitive that the reverse should be true, that lua would be faster. But the difference in speed may be marginal anyway.
I like things that you can compile, it gives you faster feed back than runtime bughunting. In the environment I work in, I cannot reload scripts anyway during run time and have to exit and reload spring in any occasion, so for me the compile step is not extra work, rather it helps to spot obvious errors.
Extra acces to things in lua is a big plus though. I wasn't aware of that based on the existing documentation.
However, it's logical to assume that compiled things are faster than things done in run-time. To me it sounds counter intuitive that the reverse should be true, that lua would be faster. But the difference in speed may be marginal anyway.
I like things that you can compile, it gives you faster feed back than runtime bughunting. In the environment I work in, I cannot reload scripts anyway during run time and have to exit and reload spring in any occasion, so for me the compile step is not extra work, rather it helps to spot obvious errors.
Extra acces to things in lua is a big plus though. I wasn't aware of that based on the existing documentation.
Re: Aircraft landed and shooting
Jools wrote:It's not speculation, if I would speculate I would go to the stock market. Speculation is the wrong word. It's an unverified hypothesis.
spec·u·la·tion
ˌspekyəˈlāSHən/
noun
noun: speculation; plural noun: speculations
1.
the forming of a theory or conjecture without firm evidence.
it is exactly speculation.con·jec·ture
kənˈjekCHər/
noun
noun: conjecture; plural noun: conjectures
1.
an opinion or conclusion formed on the basis of incomplete information.
Re: Aircraft landed and shooting
Not in the context of spring.Jools wrote: I like things that you can compile, it gives you faster feed back than runtime bughunting.
but we are talking spring.Jools wrote:In the environment I work in, I cannot reload scripts anyway during run time and have to exit and reload spring in any occasion, so for me the compile step is not extra work, rather it helps to spot obvious errors.
To compile something is to convert it to some sort of code that can be understood by the machine's hardware. Scripts doing this is silly as they still have to be read and then run by an engine. There is nothing gained outside of some possible optimization done during the compile process. Odds are this is not really an optimization for spring it was an optimization for OTA and I have no idea why they even felt the need to do it.
Why didn't you look at MCL or GBS? both of which easily demonstrate the power of unit scripts in lua.Jools wrote:Extra acces to things in lua is a big plus though. I wasn't aware of that based on the existing documentation.
Re: Aircraft landed and shooting
The callins MoveRate () Activate () Deactivate () would be another way to check if aircraft is landed or in air.
http://springrts.com/wiki/Animation-CobLuaDifferences
Why anyone would be personally bothered because of whatever scripting in some years old mod I still did not understand.
http://springrts.com/wiki/Animation-CobLuaDifferences
Why anyone would be personally bothered because of whatever scripting in some years old mod I still did not understand.
Please do not mess around with such things just to fix a problem that in 99% cases is purely cosmetic...So it's maybe easier to adjust the cones and the los radiuses anyway, especially since fighters maybe do not need large those anyway.
Re: Aircraft landed and shooting
It's not a cosmetic problem.
Re: Aircraft landed and shooting
I agree that it is not a cosmetic problem but there are ways to fix it. the thing is, unless it is considered a bug by that project, there is no way to fix it. I assume you are talking about ba/bar
Re: Aircraft landed and shooting
havent yall heard of /reloadcob?
Re: Aircraft landed and shooting
Yep, Spring.GetUnitIsActive() returns true when aircraft's engines are activeknorke wrote:The callins MoveRate () Activate () Deactivate () would be another way to check if aircraft is landed or in air.