Jump to content
  • 0

AI multiplies itself after restart


Darihon

Question

Hello,

 

Currently I have a really weird but which multiplies the AI after a restart.  This is the piece of code that I use:

 

 

_unit_4444 = objNull;
if (true) then
{
  _this = createAgent ["Ins_Soldier_Crew", [15486.6,13235.5], [], 0, "CAN_COLLIDE"];
  _unit_4444 = _this;
  _this setDir 94; //trader will face north
  _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;
};
 
_unit_4446 = objNull;
if (true) then
{
  _this = createAgent ["gsc_scientist2", [8265.77,15494,2], [], 0, "CAN_COLLIDE"];
  _unit_4446 = _this;
  _this setDir 235; //trader will face north
  _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;
};
 
_unit_4448 = objNull;
if (true) then
{
  _this = createAgent ["gsc_eco_stalker_mask_duty", [12397.7,5075.86], [], 0, "CAN_COLLIDE"];
  _unit_4448 = _this;
  _this setDir 94; //trader will face north
  _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;
};
 
_unit_4450 = objNull;
if (true) then
{
  _this = createAgent ["nof_fsk_tl", [12864.9,9133.56], [], 0, "CAN_COLLIDE"];
  _unit_4450 = _this;
  _this setDir 94; //trader will face north
  _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;
};

 
I'm calling it from my init.sqf, do I need to remove the line to stop it from multiplying?
 
Darihon
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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...