Home   Help Search Login Register  

Author Topic: Insubordination: group doesn't stop attacking enemies  (Read 3267 times)

0 Members and 1 Guest are viewing this topic.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Insubordination: group doesn't stop attacking enemies
« Reply #15 on: 16 Apr 2008, 08:44:01 »
<<duplicate post deleted>>  Sry about that, my browser froze, and I re-submitted... :-[
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Loyalguard

  • Former Staff
  • ****
Re: Insubordination: group doesn't stop attacking enemies
« Reply #16 on: 16 Apr 2008, 11:14:54 »
@Johnny

I think the problem is that Myke is designing a resource that needs to work independent of the mission so any changes to friendliness or other side related behaivor could mess up what the original mission maker has created.

@Myke-

I think Darren's suggestion of adding disableAI "TARGET" in addition to "AUTOTARGET" is a good idea.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Insubordination: group doesn't stop attacking enemies
« Reply #17 on: 16 Apr 2008, 22:18:57 »
Ok, tried a few things....without any usable result until now. I'll post the actual code so you can see what i've tried.

Code: [Select]
_STM_squad setCombatMode "BLUE";
_STM_squad setBehaviour "CARELESS";
_STM_squad enableAttack false;
_STM_squad allowFleeing 1;

{
_x disableAI "AUTOTARGET";
_x disableAI "TARGET";
_x setskill 0;
_x setCombatMode "BLUE";
_x setBehaviour "CARELESS";
_x action ["rearm",_STM_start_obj]
}
foreach units _STM_squad;

{
(_x select 0) flyinheight (_STM_flylevel * 2);
removeallweapons (_x select 0);
}
foreach _STM_squad_list;
_STM_squad move position _STM_start_obj;
[_STM_squad, 0] setWaypointPosition [position _STM_start_obj, 0];
[_STM_squad, 0] setWaypointType "GET OUT";
[_STM_squad, 0] setWaypointBehaviour "CARELESS";
[_STM_squad, 0] setWaypointCombatMode "BLUE";
[_STM_squad, 0] setWaypointFormation "ECH LEFT";

Please do not write that same thing is set twice or even three times and is completely redundant. I just try anything that comes in my mind. The result is still the same. The planes continue to fly attacks, even after removing all weapons which is more than pointless. What i will try next is to set the group to civilian side. Maybe this will stop them attacking and make them fly back home.

Info: i don't care if they fly in formation or each on its own, as long they return to carrier position.

If someone knows something i've not already tried please tell me, i'm getting mad about this one.


:EDITH:
Problem solved!
And the Oscar goes to....johnnyboy! :D
Although i didn't used RACS side but civilian side, his way was working like a charm:
Code: [Select]
_STM_temp_center = createcenter Civilian;
_STM_temp_group = createGroup Civilian;

units _STM_squad join _STM_temp_group;
deletegroup _STM_squad;
Thats all it neededs (although the waypointsettings are still in). Thanks to all who throwed theyr input in here, gave me a lot ideas to try.
And if someone would find a solution for this problem i would be really happy for today.

Thanks again mates.
« Last Edit: 16 Apr 2008, 23:17:43 by myke13021 »

Offline Darren

  • Members
  • *
Re: Insubordination: group doesn't stop attacking enemies
« Reply #18 on: 16 Apr 2008, 23:10:16 »
May I ask if you could make a "workable" version of you mission available (basically just enough to simulate the problem)

It's difficult for me on sample pieces of functions/scripts to simulate the problem or suggest a solution.
 :dunno:

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Insubordination: group doesn't stop attacking enemies
« Reply #19 on: 16 Apr 2008, 23:19:23 »
@Darren

You might have missed i've edited my last post. Problem is solved. Else i would surely provide an example mission but it isn't necessarly any longer. But thx mate.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Insubordination: group doesn't stop attacking enemies
« Reply #20 on: 17 Apr 2008, 17:43:56 »
Quote
And the Oscar goes to....johnnyboy!

I accept this Oscar in the name of my mother and father, and wish to donate the proceeds to Whirled Peas...

...glad I could help matey!  ;)
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...