Jump to content

Running over AI and Loot


horbin

Recommended Posts

Been having some issues on previous servers with folks doing encounters by running over all the AI.  Just recently added the following so that any AI that is 'run down' has all their gear destroyed.

 

http://www.fulcrum.cc/showthread.php?tid=294

 

Under current implementation, any AI that is killed by a vehicle is identified as killing himself ( killer = killed). The code below will allow you to remove gear from AI that has been run down by vehicles. Loot remains if the AI is killed by another AI or by a player, or player mounted gun.

For SARGE AI users:
File: SAR_aikilled.sqf
Find: if (!isNull _aikiller) then {
Insert below:

// AI was killed by vehicle, fall, or other
// then _ai == _aikiller
// so strip all his items!
if ( _ai == _aikiller) then 
{
diag_log format ["**AI Gear Destroyed!: %1 was killed by %2", _ai, _aikiller];
removeAllWeapons _ai;
removeBackpack _ai;
_ai removeweapon "ItemMap";
_ai removeweapon "ItemCompass";
_ai removeweapon "ItemRadio";
_ai addMagazine "TrashTinCan";
_ai addMagazine "FoodCanCornEmpty";
_ai addMagazine "ItemTrashToiletpaper";

};

for Mission AI, or other AI using a 'bodyclean.sqf', add the following:

// Check if _aikiller is valid player.
// If it is not, then ai killed with vehicle or gun mounted weaponAccessories
diag_log format ["**AI Body Clean: %1 was killed by %2", _ai, _aikiller];
if (_ai == _aikiller) then
{
diag_log format ["**AI Gear Destroyed!: %1 was killed by %2", _ai, _aikiller];
removeAllWeapons _ai;
removeBackpack _ai;
_ai removeweapon "ItemMap";
_ai removeweapon "ItemCompass";
_ai removeweapon "ItemRadio";
_ai addMagazine "TrashTinCan";
_ai addMagazine "FoodCanCornEmpty";
_ai addMagazine "ItemTrashToiletpaper";
};

 

 

Link to comment
Share on other sites

I am not familiar with the DZAI or WickedAI code, but I am sure there is a routine that does clean up on the bodies.  Look through the files for where the author put the code for crediting players with kills (ie death spam, or humanity boost).  This is the same place you should be able to drop this code and have it function for you.

 

Hope that helps.

Link to comment
Share on other sites

I use WickedAI that carry RPGs.  Add a few M2s and maybe a static stinger and players will not go Yoloing the AI.  I prefer the AI to be very difficult with the same equipment as the players.  I don't want them farmed unless the players put a lot of effort and planning into dealing with them. 

 

If they are too easy and most AI missions are you end up with players with safes full of briefcases.

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