Page 1 of 1
Planes shooting while landed
Posted: 09 Dec 2009, 11:00
by Gota
I looked but couldn't find if there is a tag that prevents planes from shooting when they are on the ground.
Another thing is bombers bombing while in the air but after they are killed(they throw bombs while falling down)
Re: Planes hooting while landed
Posted: 09 Dec 2009, 13:08
by KDR_11k
Just block the weapon in COB.
Re: Planes hooting while landed
Posted: 09 Dec 2009, 17:17
by smoth
the fuck you say?

Re: Planes hooting while landed
Posted: 09 Dec 2009, 17:23
by lurker
I think you mean bombing while crashing. All planes can fire while crashing unless you do something to block it.
Re: Planes hooting while landed
Posted: 09 Dec 2009, 17:36
by CarRepairer
This thread is a hoot.
Re: Planes hooting while landed
Posted: 09 Dec 2009, 18:13
by Gota
KDR_11k wrote:Just block the weapon in COB.
Hmm yep sounds like a good solution.
In an ideal world,though,where everything is in its place and done right wouldn't it make sense to have tags for these things?
Re: Planes shooting while landed
Posted: 09 Dec 2009, 19:21
by zwzsg
In an ideal world, where everything is in its place and done right, there wouldn't be an ever growing forest of tags for unit behaviors that be controlled with ease and more versability otherwise.
Re: Planes shooting while landed
Posted: 09 Dec 2009, 19:47
by Gota
If not using tags how else would you do it and preserve the flexibility of behaviors and combination of behaviors a unit can exhibit?
I think the main issue with tags is documentation and dividing into certain well defined groups with intuitive titles so game makers can easily connect between what they want to achieve and the place they need to look for tags to achieve it.
Maybe when someone(including myself) decides to rearrange the documentation about the different tags, finding and choosing the right ones would be a breeze.
Re: Planes shooting while landed
Posted: 09 Dec 2009, 19:50
by Tobi
COB. (or the Lua replacement of it.)
Re: Planes shooting while landed
Posted: 09 Dec 2009, 19:56
by Gota
to me personally its much easier when everything connected to unit behaviors is concentrated in one place.
hmm if the time comes when it is easy to convert cob to lua i guess you could just have one big lua file that describes almost everything about the specific unit(if you have hundreds of units converting cob files manually sounds very hard and boring work).
I guess when creating new units/games now you could have that already.
Re: Planes shooting while landed
Posted: 09 Dec 2009, 20:05
by SinbadEV
Yes, and the cool thing with the Lua system is that you could, presumably, make your own "tag-like" variables that are defined in some central Lua code-thingy for your given project and reference it when you want to decide how a unit behaves... right?
Re: Planes shooting while landed
Posted: 09 Dec 2009, 20:10
by Saktoth
Gota wrote:to me personally its much easier when everything connected to unit behaviors is in unitdefs because i dont know how to script
Fixed.
There are an innumerable number of conditions under which you will want to block the firing of a weapon.
There are innumerable number of things you may want to do with a crashing or landed aircraft.
This kind of conditional If -> Then stuff is exactly what cob is good at.
BlockShot1(unit, block)
{
if (get CRASHING)
{
block = 1;
}
}
How bloody easy was that? You can do the same thing to make it emit smoke (In fact, that shit shouldnt be hardcoded), sparks, change the model, change the velocity, direction, or any other movement settings, call lua to make a unit jump out of it with a parachute, just blow it up rather than going through the whole crashing routine or any number of other things.
Take a look at the current wing folding behaviour for decent (but not perfect) detection of landing/flying.
Re: Planes shooting while landed
Posted: 09 Dec 2009, 20:24
by Gota
Saktoth wrote:post
good point.
It would probably still be more convenient to have it all in one place including the script.
Re: Planes shooting while landed
Posted: 09 Dec 2009, 23:57
by Saktoth
Gota wrote:Saktoth wrote:post
good point.
It would probably still be more convenient to have it all in one place including the script.
To have it 'all in one place' would be 'all hardcoded into the engine'.
At the very least it would all be in the script, rather than the unitdef, since the script does things the unitdef simply never can. Do you want to have to make every change to a unit through the script? That'd make spring less accessible by far. And hell, why not shove the model data in there too, each vertex.
Its good to have several layers of complexity to handle different tasks: unitdef, script, lua, engine. It is that level of accessibility that has made OTA a modders paradise.
Re: Planes shooting while landed
Posted: 10 Dec 2009, 00:03
by Gota
As far as i know its now possible to make scripts using lua.
Or its planned to be.
Re: Planes shooting while landed
Posted: 10 Dec 2009, 00:17
by MidKnight
It is currently possible, and implemented in 2-3 games already.

Re: Planes shooting while landed
Posted: 10 Dec 2009, 01:16
by Argh
Yes, and the cool thing with the Lua system is that you could, presumably, make your own "tag-like" variables that are defined in some central Lua code-thingy for your given project and reference it when you want to decide how a unit behaves... right?
Been doing that for over a year now.