Couple of questions...
Moderators: winston, another_commander
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Away for weekend at the moment so don't have Oolite available, but Won't it be easier to use escortAI? (see Giles's AIs)? A ship with escort AI will defend itself if attacked and will fly escorting the mothership, defending her if she is attacked, provided you define in the mother's shipdata that the escortships are your oxp escort ship.s EG: key <escort-role> <string>myescortship<\string>. Unless of course you want the escorts to do somthing other than flying in formation with the mother!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Odd!
Using escortAI my ecorts defend themselves well and will group attack if one of them is attacked. 9 times out of ten, they defend the mother, but occasionally sit there whilst you blast her!
Using escortAI my ecorts defend themselves well and will group attack if one of them is attacked. 9 times out of ten, they defend the mother, but occasionally sit there whilst you blast her!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
I just tried replacing groupAttackTarget with fightOrFleeHostiles (as used in the route1traderAI) in the mother's main AI - still no dice! In fact, it made it worse - when I attacked the mother directly, only two of the escorts responded. Which is just weird.
Think Giles may be the only one who can help me on this. I'm pretty much out of ideas.
Think Giles may be the only one who can help me on this. I'm pretty much out of ideas.
Yep, *now* I'm out of ideas!
I replaced the TARGET_DESTROYED and TARGET_LOST lines (under "FLYING_ESCORT" in the main escort AI) with a MOTHER_LOST line, just in case the escorts were reading TARGET_LOST and getting stuck in "LOOK_FOR_MOTHER" - not very likely, but hey. And of course, it didn't work.
Wish I had a big searchlight with the Oolite logo on it I could shine up into the sky
I replaced the TARGET_DESTROYED and TARGET_LOST lines (under "FLYING_ESCORT" in the main escort AI) with a MOTHER_LOST line, just in case the escorts were reading TARGET_LOST and getting stuck in "LOOK_FOR_MOTHER" - not very likely, but hey. And of course, it didn't work.
Wish I had a big searchlight with the Oolite logo on it I could shine up into the sky
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
Hey there So how would I do that?
Actually, I'm pretty sure the mother isn't getting stuck - I've followed it as it flies between its various waypoints, and it responds as it should when it's attacked, triggering the escorts as well (the only problem is the Q-bomb issue). It even seems to respond properly when an escort is attacked. It's the escorts that are the problem: when I start by attacking one of them, they seem to refuse to go red - despite the fact that the mother goes red (indicating successful communication).
Actually, I'm pretty sure the mother isn't getting stuck - I've followed it as it flies between its various waypoints, and it responds as it should when it's attacked, triggering the escorts as well (the only problem is the Q-bomb issue). It even seems to respond properly when an escort is attacked. It's the escorts that are the problem: when I start by attacking one of them, they seem to refuse to go red - despite the fact that the mother goes red (indicating successful communication).
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
under attacked you have setTargetToPrimaryAggressor,
try : "setTargetToPrimaryAggressor",
I wrote a AI that was meant to scan for Nearest ship with role and then atatck it. I tore my hair out cursing it as it refused to function at all until I put the the scanforNearestshipwithrole: erebel in quotes. I still have no idea why this made it work, but it worked perfectly as soon as put the command in ""s. Perhaps this is why the mother goes red but the escort doesn't attack. The commincation is quotes works, but the unquoted setTarget to PrimaryAgressor does not. Just an idea!
EDIT: Perhaps you also need a performattack here as well!
try : "setTargetToPrimaryAggressor",
I wrote a AI that was meant to scan for Nearest ship with role and then atatck it. I tore my hair out cursing it as it refused to function at all until I put the the scanforNearestshipwithrole: erebel in quotes. I still have no idea why this made it work, but it worked perfectly as soon as put the command in ""s. Perhaps this is why the mother goes red but the escort doesn't attack. The commincation is quotes works, but the unquoted setTarget to PrimaryAgressor does not. Just an idea!
EDIT: Perhaps you also need a performattack here as well!
Last edited by LittleBear on Sun Aug 27, 2006 9:00 pm, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
I know. But when I wrote a "killplayer" AI, I just took ThargoidAI changed the ScanforNonThargoid (not in quotes) with ScanforNearestShipwithRole : player (not in quotes) and the ships just tumbled. Added the quotes and the ships attacked me without pity! I cannot think of any reason why this worked, but it did!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Oh. Sorry stumped then! Perhaps add performattack.
Under the attacked bit, you don't seem to either have a "setAITo: taranisGeckoFightAI.plist"); or a SetStateto : ATTACK SHIP. Could this be why they message mummy (and she goes red), but don't attack themselves? The code only tells them to message mum?
EDIT:-
(I mean in this bit of the code)
I'm not brilliant at AI's but could this mean that when attacked whilst "Flying_Escort" the ships only messege mum, but don't attack themselves as they are not being told to?
Under the attacked bit, you don't seem to either have a "setAITo: taranisGeckoFightAI.plist"); or a SetStateto : ATTACK SHIP. Could this be why they message mummy (and she goes red), but don't attack themselves? The code only tells them to message mum?
EDIT:-
(I mean in this bit of the code)
Code: Select all
{
"FLYING_ESCORT" = {
ENTER = (performEscort);
ESCORTING = ("setDesiredRangeTo: 0.0", performEscort);
"NOT_ESCORTING" = ("setStateTo: LOOK_FOR_MOTHER");
ATTACKED = ("messageMother: ATTACKED");
EXIT = ();
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
If I added an attack command there, then that individual would probably attack - but the thing is, I need to get all of the escorts to attack. Which the mother should be telling them to do (via a groupAttackTarget command, sent back in response).
What's really confusing me is that after I start on the second or third escort, it *does* kick in. So it's *almost* working! Or working at least some of the time.
What's really confusing me is that after I start on the second or third escort, it *does* kick in. So it's *almost* working! Or working at least some of the time.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Would MessageEscorts: ATTACKED be vaild? Or perhaps have a performGroupAttack at this point (I mean in the escort's AI). That should get them all attacking if one of their number is attacked.
Last edited by LittleBear on Sun Aug 27, 2006 9:48 pm, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.