Jump to content

AI Changes


Recommended Posts

Hello there, I am trying to change the AI from bandits to a faction that will yield negative humanity. I have scoured over the files but I just cannot figure it out. I tried editing the DZMSConfig.sqf file changing these settings but it just makes the player get no humanity. How can I make this happen?

DZMSMissHumanity = false;

DZMSCntBanditKls = false;
Link to comment
Share on other sites

DZMSAIKilled.sqf

if (DZMSMissHumanity) then {
    _player setVariable ["humanity",(_humanity - DZMSCntHumanity),true];
};

DZMSConfig.sqf define how much negative humanity you want from one AI kill.

DZMSCntHumanity = 100;

and set

DZMSMissHumanity = true;
Link to comment
Share on other sites

One question for you Sukkead: 

 

How would I do this when I want Bandit and Hero missions? 

 

Do I make another if statement with: 

if (DZMSMissHumanity && DZMSAImilitary) then { // DZMSAImilitary is declared in DZMSFuntions
_player setVariable ["humanity",(_humanity - DZMSCntHumanity),true];
};
 
Link to comment
Share on other sites

DZMSAImilitary is the same as DZMSAISpawn, but the side is changed to 'west' and the skins are changed. I will see if I can find the "DZMSMissHumanity" in another file and I'll see if I can make something work with that, thanks tho!

Link to comment
Share on other sites

Should anything like this work out: 

 
if (DZMSMissHumanity && _unitGroup == west) then {
  _player setVariable ["humanity",(_humanity - DZMSCntHumanity),true];
    };
private ["_unit","_player","_humanity","_banditkills","_unitGroup"];
_unit = _this select 0;
_player = _this select 1;
_unitGroup = call DZMSAImilitary.sqf;

and yes, it is added by myself.

Link to comment
Share on other sites

Replace this

if (DZMSMissHumanity) then {
    _player setVariable ["humanity",(_humanity + DZMSCntHumanity),true];
};

with this

_unitside = side _unit;

switch (_unitside) do {
	case EAST: {
		_player setVariable ["humanity",(_humanity + 100),true];
	};
	case WEST: {
		_player setVariable ["humanity",(_humanity - 100),true];
	};
};
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
  • Advertisement
  • Discord

×
×
  • Create New...