Jump to content
  • 0

[SOLVED] Trader's movement with guns


Thug

Question

In the file server_spawnTraders.sqf

private "_trader";
{
	_trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; 
	{_trader removeMagazine _x;} count magazines _trader;
	removeAllItems _trader;
//	removeAllWeapons _trader;//this is commented out so traders have weapons
	removeBackpack _trader;
	_trader switchMove "";
	_trader setDir (_x select 2);
	_trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;";
	_trader setUnitAbility 0.6;
	_trader disableAI "ANIM";
	_trader disableAI "AUTOTARGET";
	_trader disableAI "FSM";
	_trader disableAI "MOVE";
	_trader disableAI "TARGET";
	_trader setBehaviour "CARELESS";
	_trader forceSpeed 0;
	_trader allowDamage false;
	_trader enableSimulation false;
} count _this;

processInitCommands;

What would I have to do to get the Traders to move like they did in v1.0.5.1

I have tried but can not get it to work.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

@Thug

https://community.bistudio.com/wiki/disableAI

_trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;";

So im guessing
 

"MOVE" - disable the AI's movement / do not move

 

Link to comment
Share on other sites

  • 0

both of them? @Thug

Try this maybe.
 

private "_trader";
{
	_trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; 
	{_trader removeMagazine _x;} count magazines _trader;
	removeAllItems _trader;
//	removeAllWeapons _trader;//this is commented out so traders have weapons
	removeBackpack _trader;
	_trader switchMove "";
	_trader setDir (_x select 2);
	_trader setVehicleInit "this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;";
	_trader setUnitAbility 0.6;
	_trader disableAI "AUTOTARGET";
	_trader disableAI "FSM";
	_trader disableAI "TARGET";
	_trader setBehaviour "CARELESS";
	_trader forceSpeed 0;
	_trader allowDamage false;
	_trader enableSimulation false;
} count _this;

processInitCommands;

 

Link to comment
Share on other sites

  • 0

 

//commented out 5 statements and changed a false to true. It works now.
private "_trader";
{
	_trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; 
	{_trader removeMagazine _x;} count magazines _trader;
	removeAllItems _trader;
//	removeAllWeapons _trader;//this is commented out so traders have weapons
	removeBackpack _trader;
	_trader switchMove "";
	_trader setDir (_x select 2);
	_trader setVehicleInit "/*this disableAI 'ANIM';*/ this disableAI 'AUTOTARGET'; this disableAI 'FSM'; /*this disableAI 'MOVE';*/ this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;";
	_trader setUnitAbility 0.6;
//	_trader disableAI "ANIM"; //commented out
	_trader disableAI "AUTOTARGET";
	_trader disableAI "FSM";
//	_trader disableAI "MOVE";  //commented out
	_trader disableAI "TARGET";
	_trader setBehaviour "CARELESS";
	_trader forceSpeed 0;
	_trader allowDamage false;
	_trader enableSimulation true;  //changed this to true
} count _this;

processInitCommands;
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...