Aircraft landed and shooting
Moderator: Moderators
Re: Aircraft landed and shooting
I guess the difference between feature and a bug is whether it bothers someone. I think it's not an issue in ba due to the smalller LOS a fighter has when landed, meaning that in many cases it won't be firing in any case, becauase it can't see any targets.
In xta I think it's an issue, at least people complain about it. But I didn't say the answer has to be to reduce ground-los of fighter. I was merely exploring options.
About the unit script approach: activate/deactivate I know is used in some ways to have unit turn on/off radar, but even if you do some coding in that part, how do you prevent the unit from gaining targets?
In xta I think it's an issue, at least people complain about it. But I didn't say the answer has to be to reduce ground-los of fighter. I was merely exploring options.
About the unit script approach: activate/deactivate I know is used in some ways to have unit turn on/off radar, but even if you do some coding in that part, how do you prevent the unit from gaining targets?
Re: Aircraft landed and shooting
Why not just block aiming in the script to begin with ?
Re: Aircraft landed and shooting
knorke wrote: http://springrts.com/wiki/Animation-CobLuaDifferences
The neutrality of this article is disputed. Relevant discussion may be found on the talk page. Please do not remove this message until the dispute is resolved.
Re: Aircraft landed and shooting
You are starting to get on my nerves even cob can do a weapon jam wtf does this have to do with my question?
Re: Aircraft landed and shooting
Nothing. It wasn't a response to your question.
But I did earlier ask how to handle unit aiming in a script. Once I know how to do that, it will be easier to answer why I do/do not do that.
But I did earlier ask how to handle unit aiming in a script. Once I know how to do that, it will be easier to answer why I do/do not do that.
Re: Aircraft landed and shooting
something like...AimWeapon3(heading,pitch)
{
signal SIG_AIM_3;
set-signal-mask SIG_AIM_3;
// Announce that we would like to aim, and wait until we can
while (NOT bMissilesOn)
{ sleep 100; }
sleep 100;
return(TRUE);
}
Re: Aircraft landed and shooting
Where are you quoting that from? Stock wikipedia neutrality quote?Jools wrote:knorke wrote: http://springrts.com/wiki/Animation-CobLuaDifferencesThe neutrality of this article is disputed. Relevant discussion may be found on the talk page. Please do not remove this message until the dispute is resolved.
Page isn't perfect in terms of its grammar and style but the information is correct. Objectively, lua is superior. I don't mean to toot our collective own horns, but Smoth and myself have done more cob and lus than most people and we will both agree vehemently that lua is the way forward.
Re: Aircraft landed and shooting
...is bad.smoth wrote:something like...AimWeapon3(heading,pitch)
{
signal SIG_AIM_3;
set-signal-mask SIG_AIM_3;
// Announce that we would like to aim, and wait until we can
while (NOT bMissilesOn)
{ sleep 100; }
sleep 100;
return(TRUE);
}
Code: Select all
AimWeapon3(heading,pitch)
{
if (MissilesOn) {return 1; }
return 0;
}
Re: Aircraft landed and shooting
Yes. Maybe lua is better, but the neutrality issue is the way that page is written.FLOZi wrote: Where are you quoting that from? Stock wikipedia neutrality quote?
It's quite obvious from the text that the author prefers lua. If it's really that obvious that lua is better, then why even present the page as some kind of comparativity study, why not make the title "The benefits of lua over cob", because that sentiment in the article anyway.
Otherwise the reader may wonder what the agenda behind the article is anyway.
Re: Aircraft landed and shooting
you are really paranoid mate. Look, I don't care if you believe me or not. Frankly you and the rest of the world who feel I owe them proof for anything really urks me. Keep using cob keep believing a compiler is used for "debugging" I don't care. So much time wasted.
knorke has posted a revised version of my code example. You could try and work based on something like that. Since you have no fireweapon as it is not a turret, odds are you can block it somehow at query weapon or something like that. I dunno just go play with it.
knorke has posted a revised version of my code example. You could try and work based on something like that. Since you have no fireweapon as it is not a turret, odds are you can block it somehow at query weapon or something like that. I dunno just go play with it.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Aircraft landed and shooting
FLOZi wrote:Page isn't perfect in terms of its grammar and style but the information is correct. Objectively, lua is superior. I don't mean to toot our collective own horns, but Smoth and myself have done more cob and lus than most people and we will both agree vehemently that lua is the way forward.
I agree, but in some cases it simply isn't practical when you have everything already in cob and aren't doing anything even remotely special.
If you were starting from a more or less clean slate I would wholeheartedly encourage LUS.
Re: Aircraft landed and shooting
Absolutely agree. I wouldn't campaign for people to replace all their bos for the sake of it (would probably result in awfully sloppy LUS), especially considering S44 is one of the biggest holdouts (SWIW too fwiw).Forboding Angel wrote:FLOZi wrote:Page isn't perfect in terms of its grammar and style but the information is correct. Objectively, lua is superior. I don't mean to toot our collective own horns, but Smoth and myself have done more cob and lus than most people and we will both agree vehemently that lua is the way forward.
I agree, but in some cases it simply isn't practical when you have everything already in cob and aren't doing anything even remotely special.
If you were starting from a more or less clean slate I would wholeheartedly encourage LUS.
Re: Aircraft landed and shooting
Are you outside my house now?smoth wrote:you are really paranoid mate.
Re: Aircraft landed and shooting
Why do you have all that vodka and I hate your chairs, they don't match the style of your sofa!
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Aircraft landed and shooting
Code: Select all
function script.BlockShot(num, targetID)
return not Spring.GetUnitIsActive()
end
This type of behaviour should not be in the engine because it is trivial to implement in the script. It is also not a bug, some game may want to create a turreted aircraft which is intended to be used as a static combat unit when landed.
On a related note I am annoyed that units do not try to aim while they are repairing or reclaiming. As far as I can tell it is difficult to create a unit which could reclaim and shoot at the same time. If the engine was hardcoded the other way around it would be extremely easy for games to block firing while reclaiming in their unit scripts.
Re: Aircraft landed and shooting
GetUnitIsActive is triggered by many things including on/offable right?
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Aircraft landed and shooting
I am not sure. The most reliable solution would be to disable the weapons if the unit drops below a certain speed. I think that setting a value in Activate and Deactivate would work too.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Aircraft landed and shooting
IIRC, onoffable simply adds a button to the menu but doesn't actually do anything.
Re: Aircraft landed and shooting
wrongForboding Angel wrote:IIRC, onoffable simply adds a button to the menu but doesn't actually do anything.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Aircraft landed and shooting
It adds a button that toggles on and off in the script. That much is obvious, but knorke has to be anal about every word in a sentence.
Specifically, activate/deactivate.
The unitdef tag doesn't do anything except add a button. If your script isn't making use of activate/deactivate, adding the unitdef tag will not magically add functionality for you.
It should be unnecessary to say all of this, but as I said, knorke is anal for minutia.
Edit: Another more real world example.
It's like a lightswitch that will turn on the lights but only if the electric is hooked up to it, Just putting the lightswitch in the wall isn't going to magically make it turn on your lights.
Specifically, activate/deactivate.
The unitdef tag doesn't do anything except add a button. If your script isn't making use of activate/deactivate, adding the unitdef tag will not magically add functionality for you.
It should be unnecessary to say all of this, but as I said, knorke is anal for minutia.
Edit: Another more real world example.
It's like a lightswitch that will turn on the lights but only if the electric is hooked up to it, Just putting the lightswitch in the wall isn't going to magically make it turn on your lights.