Jump to content
  • 0

AI helicopters attacking one of my custom traders!


Bob_the_K

Question

I have a small fleet of helis circling Taviana looking for survivors.   Problem is that as soon as they encounter my custom trader, they get stuck there. trying to kill him.

 

So I'm pretty sure this has to do with the EAST/WEST attribute of the skin the trader is wearing.  He's wearing the G_Mercenary_Default19a skin.  Where can I find the attributes of the skins so I can find one so that they'll ignore him and keep flying?

 

Thanks,

Bob 

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Not sure about the entire east/west thing. But even the preconfigured traders in my servers get attacked when the ai stumble across them. Another guy had a similar issue and made his trader into a vending machine. So maybe considering making a non ai trader as a temp fix until you find something better.  

 

in fn_selfactions simply change:

 

if (_isMan && !_isPZombie && _traderType in serverTraders) then {

to

if ((_isMan || _cursorTarget isKindOf "MAP_vending_machine") && !_isPZombie && _traderType in serverTraders) then {

or change "MAP_vending_machine" to whatever you want to use as a trader.

 

And make the classname edits in the server_traders.sqf and mission.sqf as well.

 

I know this isnt quite what you were looking for but it will definitely stop AI from attacking the area and getting held up.

Link to comment
Share on other sites

  • 0
So I'm pretty sure this has to do with the EAST/WEST attribute of the skin the trader is wearing.  He's wearing the G_Mercenary_Default19a skin.  Where can I find the attributes of the skins so I can find one so that they'll ignore him and keep flying?

 

G_Mercenary_Default19 is definitely not friendly to bandits.

 

What method are you spawning him?

 

just the traditional mission.sqf?

Link to comment
Share on other sites

  • 0

Here they are... I have two set up.

 

class Item39


{
position[]={17663.4,0,6289.25};
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zoneBlackMarketDealer";
expCond="(player distance zoneBlackMarketDealer) < 150;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
};
};
class Item40
{
position[]={17663.4,0,6289.25};
a=100;
b=100;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="BlackMarketDealer";
expCond="(player distance BlackMarketDealer) < 40;";
expActiv="canbuild = false; clearzeds = [] execVM ""custom\clearzeds.sqf""; speedlimit = [] execVM ""custom\speedlimit.sqf""; titleText [""\n\nEntering the trader - god mode on"", ""PLAIN DOWN"", 1];";
expDesactiv="canbuild = true; terminate clearzeds; terminate speedlimit; titleText [""\n\nLeaving the trader - god mode off"", ""PLAIN DOWN"", 1];";
class Effects
{
};
};
class Item41
{
position[]={3813.11,0,18124.9};
a=100;
b=100;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="BlackMarketDealer2";
expCond="(player distance BlackMarketDealer2) < 50;";
expActiv="canbuild = false; clearzeds = [] execVM ""custom\clearzeds.sqf""; speedlimit = [] execVM ""custom\speedlimit.sqf""; titleText [""\n\nEntering the trader - god mode on"", ""PLAIN DOWN"", 1];";
expDesactiv="canbuild = true; terminate clearzeds; terminate speedlimit; titleText [""\n\nLeaving the trader - god mode off"", ""PLAIN DOWN"", 1];";
class Effects
{
};
};
class Item42
{
position[]={3813.11,0,18124.9};
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zoneBlackMarketDealer2";
expCond="(player distance zoneBlackMarketDealer2) < 150;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
};
};

 

Anything I can easily change?  They ignore the regular traders on the Tavi map at Sabina, Lyepestock, etc.  They just seem to get stuck at these.  I'm pretty sure there are skins that are totally invisible to all AI but I just don't know which they are.

 

Thanks,

Bob

Link to comment
Share on other sites

  • 0

Here they are....

 

//-------------------------------BLACK MARKET DEALER-------------------------


_unit_150 = objNull;
if (true) then
{
_this = createAgent ["G_Mercenary_Default19a", [17662.7,6287.71,0], [], 0, "CAN_COLLIDE"];
_unit_144 = _this;
_this setDir 358;
_this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
_this setUnitAbility 0.60000002;
_this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;
};


//------------------------------------------------------------------------------

//----------------------------------BLACK MARKET DEALER 2-----------------------
_unit_154 = objNull;
if (true) then
{
_this = createAgent ["G_Mercenary_Default19a", [3813.11,18124.9,0.13496], [], 0, "CAN_COLLIDE"];
_unit_144 = _this;
_this setDir 242.505;
_this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
_this setUnitAbility 0.60000002;
_this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;
};

 

Thanks for taking a look.

 

Bob

Link to comment
Share on other sites

  • 0

I thought maybe the setVehicleInit or allowDammage lines might have been wrong but they seem to be ok. The only thing I can think of is the skin you selected. Maybe try another skin? Pick a skin from here: http://www.armatechsquad.com/ArmA2Class151656165165341654165165165165f/indexA2.php

 

You could also try adding "this setCaptive true;" to the end of the setVehicleInit and "_this setCaptive true;" to the allowDammage lines so it looks like this:

_this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this setCaptive 'TRUE';";
_this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false; _this setCaptive true;

Not positive if the 'TRUE' in the first part is correct. It might be lower case with no quotes. This is untested, but setting an AI as captive makes it so the AI doesn't attack it. I used that on the AI coastal bus to stop them from attacking the bus.

Link to comment
Share on other sites

  • 0

Woot!   The format is    this setCaptive true;

 

They don't get stuck any more.  Now I just have to make them more aggressive.  They're pretty tame at the moment.  I want to add the ability for them to land and the AI get out and track survivors.

 

Also, I think on an Origins server, I played a variant that they had tags that were yellow, which turned red if they spotted you.  I haven't figured out how do that yet.

 

Thanks BDTZ!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...