Page 1 of 2
HEY YAN
Posted: 20 Jan 2010, 01:41
by smoth
turnRadius = 0,
maxRudder = 5,
figured this would get your attention.
This might give you what you have been wanting.
Re: HEY YAN
Posted: 20 Jan 2010, 01:50
by Gota
now tell your fighter to attack an llt and report back.
Re: HEY YAN
Posted: 20 Jan 2010, 01:52
by smoth
here is a video...
you can figure out the rest right?
http://www.smoth.net/home/spring/hurfIareaplane.SWF
Re: HEY YAN
Posted: 20 Jan 2010, 02:13
by smoth
turnRadius = 100,
maxRudder = 0.5,
maxBank = 1,
maxElevator = 0.05,
maxAileron = 0.05,
myGravity = 0.2,
will give you a ridiculous aircraft
have fun.
Re: HEY YAN
Posted: 20 Jan 2010, 02:27
by Gota
I didn't just ask you to make it attack an llt.
I tried all of this ages ago..
This is not the problem.
The problem is the fact they will not do flybys now..
Tell it to attack a static ground target and watch what happens.
Re: HEY YAN
Posted: 20 Jan 2010, 02:46
by Coresair
Why fly when you can spin atop your enemies!
Re: HEY YAN
Posted: 20 Jan 2010, 03:04
by smoth
Code: Select all
-- UNITDEF -- TORIARES --
--------------------------------------------------------------------------------
local unitName = "toriares"
--------------------------------------------------------------------------------
local unitDef = {
acceleration = 20,
altfromsealevel = "1",
bankscale = "3",
bmcode = "1",
brakeRate = 1,
buildCostEnergy = 0,
buildCostMetal = 0,
builder = false,
buildTime = 30,
canAttack = true,
canFly = true,
canGuard = true,
canMove = true,
canPatrol = true,
canstop = "1",
category = "AIR PITIFUL",
collide = false,
cruiseAlt = 400,
defaultmissiontype = "VTOL_standby",
description = "Very Light attack aircraft (builds 5)",
explodeAs = "SMALL_UNITEX",
firestandorders = "1",
footprintX = 1.5,
footprintZ = 2,
iconType = "fed",
idleAutoHeal = 0,
maneuverleashlength = "1000",
maxDamage = 200,
maxSlope = 150.00,
maxVelocity = 9,
maxWaterDepth = 0,
minCloakDistance = 68,
mobilestandorders = "1",
name = "toriares",
objectName = "units/toriaresu.s3o",
pitchscale = "1",
power = 4,
reclaimable = false,
selfDestructAs = "SMALL_UNITEX",
shootme = "1",
side = "renpou",
sightDistance = 675.00,
standingfireorder = "2",
standingmoveorder = "1",
steeringmode = "1",
TEDClass = "VTOL",
threed = "1",
transportByEnemy = false,
turnRate = 500,
turnRadius = 200,
maxRudder = 0.01,
maxBank = 0.95,
maxPitch = 90,
maxElevator = 0.09,
maxAileron = 0.08,
myGravity = 0.2,
Drag = 0,
WingDrag = 0,
unitname = "toriares",
unitnumber = "426",
version = "1",
zbuffer = "1",
customparams = {
factionname = "federation",
loosesquad = "1",
squadMember1 = "toriares",
squadMember2 = "toriares",
squadMember3 = "toriares",
squadMember4 = "toriares",
costrefined = "50",
},
sfxtypes = {
explosiongenerators = {
"custom:jetflash",
},
},
sounds = {
canceldestruct = "cancel2",
underattack = "warning1",
arrived = {
"hoverstop",
},
cant = {
"cantdo4",
},
count = {
"count5",
"count4",
"count3",
"count2",
"count1",
"count0",
},
ok = {
"hover",
},
select = {
"hoverstart",
},
},
weapons = {
[1] = {
name = "DOPPER",
},
},
}
--------------------------------------------------------------------------------
return lowerkeys({ [unitName] = unitDef })
--------------------------------------------------------------------------------
This is the closest I can get with the current tags. We need some kind of tag to determine the time an aircraft will spend going away after passing over a target. beyond playing around with yan's want for ota fighter dancing such a tag would be useful. As certain aircraft weapons would require a certain distance from a target before firing. For example, this same aircraft with a fuel bomb would fly back into it's own explosion.
Re: HEY YAN
Posted: 20 Jan 2010, 03:07
by Gota
Such a tag exists...its called turnradius..
unfortunately it prevents you from conveniently controlling the movement of your plane since the plane will not respond to move commands issues at a distance less than the turnradius value.
the solution might be splitting this tag into how it operates when the unit is given an attack command and a move command.
Re: HEY YAN
Posted: 20 Jan 2010, 03:11
by smoth
no
turn radius determines the size of the turn when the aircraft is correcting it's path.
We need something like attack distance or something else...
as in the distance before the aircraft CAN try to turn when the ai controls it..
Re: HEY YAN
Posted: 20 Jan 2010, 10:28
by Saktoth
When i test those variables the planes get caught in the most ridiculous, uncontrollable tailspins.
This always happens when i mess with these variables
Re: HEY YAN
Posted: 20 Jan 2010, 12:29
by Neddie
Well, really, applying those tags requires first a solid grasp of flight mechanics, and second, the willingness to throw all that out the window and embrace the extremely cool but completely insane advanced flight variables here. Oh, and a lot of testing. I've been there, Sak, you are not alone. As I mentioned to #peet, Fang once had aircraft that would zoom off the map at ever increasing speed, never to return again - I think he referred to the phenomenon as "inverse friction". Those tags were responsible.
Re: HEY YAN
Posted: 20 Jan 2010, 12:48
by Gota
There are certain acceptable ratios and certain ratios that cause crazy uncontrollable behavior...
Small incremental changes and patience..
@smoth.
turnradius="hint to the ai about how large turn radius this plane needs "
As you can see it does not set the turn radius..It cheats the ai into thinking the airplane needs more space to turn even when it doesn't.
This means the plane will keep flying longer before it turns which is what you want.
The only issue is the plane becomes hard to control because if you give the plane a move order behind it,which is inside the turnradius,it will keep flying until the specified target is outside the turnradius value and not turn at the exact moment you tell it to.
controlling the plane like this is frustrating(you can cheat this system by giving a move order that is outside the turnradius thereby cheating it into actually turning immidietly and arriving at the spot you want).
Re: HEY YAN
Posted: 20 Jan 2010, 16:56
by smoth
yan, the turn radius var is for TURNING.
What I am saying is we need two vars.
one for turn radius
one for when the ai knows it is a safe distance to start a turn
Re: HEY YAN
Posted: 20 Jan 2010, 22:17
by Gota
Wau...it has no influence on the turning of the plane..just test Smoth...just test.
Turnradius controls the distance after which the plane will turn back to its target.
Re: HEY YAN
Posted: 20 Jan 2010, 22:29
by smoth
I did. Turn radius is just that. the size of the the radius of the TURNING circle.
As in the aircraft has to travel this distance to make it's turn work.
Re: HEY YAN
Posted: 20 Jan 2010, 23:00
by CarRepairer
Gunship (but not fighter):
* Hovers in one spot when stopped while it has idlemode = fly.
* When given a move order, flies in a straight line from where it is to that spot.
Attacking Fighter (but not gunship)
* Flies toward and past its target as it shoots, then turns around and repeats.
Desired:
A flying unit that behaves like a fighter when given attack orders, but behaves like a gunship when not attacking.
I hope this is as clear and concise as can be. lurker is adding a SetTurnRadius() function that will allow a gadget to achieve this behavior.
Re: HEY YAN
Posted: 20 Jan 2010, 23:10
by Gota
smoth wrote:I did. Turn radius is just that. the size of the the radius of the TURNING circle.
As in the aircraft has to travel this distance to make it's turn work.
Yes thats what the ai thinks but it has no real influence on the plane's actual ability to turn...if the plane's parameters make it agile and able to turn real fast but its turn radius is big it will just act as the distance after which the plane will turn back.
Re: HEY YAN
Posted: 20 Jan 2010, 23:11
by smoth
so if it had a tag to tell it the distance before turning, having a small turning radius would work.
Re: HEY YAN
Posted: 20 Jan 2010, 23:14
by Warlord Zsinj
air flight tags are voodoo and are best handled by a shaman
Re: HEY YAN
Posted: 20 Jan 2010, 23:20
by Gota
CarRepairer wrote:Gunship (but not fighter):
* Hovers in one spot when stopped while it has idlemode = fly.
* When given a move order, flies in a straight line from where it is to that spot.
Attacking Fighter (but not gunship)
* Flies toward and past its target as it shoots, then turns around and repeats.
Desired:
A flying unit that behaves like a fighter when given attack orders, but behaves like a gunship when not attacking.
I hope this is as clear and concise as can be. lurker is adding a SetTurnRadius() function that will allow a gadget to achieve this behavior.
As i understand it,it has already been added and I guess were just waiting for the Spring release....