Minor improvements

Added distance to the party member notification when they kill an AI

The mine created by using "DMS_explode_onRoadkill" is spawned on the
player, so the player can't get away with running an AI over if he/she
simply drives really fast.
This commit is contained in:
eraser1 2016-01-09 11:06:42 -06:00
parent 7a8630b322
commit 031dd386ad
5 changed files with 15 additions and 12 deletions

View File

@ -225,11 +225,11 @@ else
};
if !((_crateValues params
[
["_weps", [], [[]]],
["_items", [], [[]]],
["_backpacks", [], [[]]]
]))
[
["_weps", [], [[]]],
["_items", [], [[]]],
["_backpacks", [], [[]]]
]))
exitWith
{
diag_log format ["DMS ERROR :: Invalid ""_crateValues"" (%1) generated from _lootValues: %2",_crateValues,_lootValues];

View File

@ -271,7 +271,8 @@ if (isPlayer _killer) then
if (DMS_explode_onRoadkill) then
{
_boom = createVehicle ["SLAMDirectionalMine_Wire_Ammo", ASLToAGL(getPosWorld _unit), [], 0, "CAN_COLLIDE"];
_boom = createVehicle ["SLAMDirectionalMine_Wire_Ammo", [0,0,100], [], 0, "CAN_COLLIDE"];
_boom setPosATL (getPosATL _playerObj);
_boom setDamage 1;
if (DMS_DEBUG) then
{

View File

@ -76,7 +76,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
if (_moneyChange!=0) then
{
private ["_msgType", "_msgParams"];
private ["_msgType", "_msgParams", "_distance", "_attributes", "_distanceBonus"];
// Set client's money
// I also make sure that they don't get negative poptabs
@ -164,7 +164,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
_members = units _group;
if (!(_group isEqualTo ExileGraveyardGroup) && {(count _members)>1}) then
{
_msg = format["%1 killed %2 and received %3 poptabs and %4 respect.",name _playerObj,name _unit,_moneyChange,_repChange];
_msg = format["%1 killed %2 from %3 meters away and received %4 poptabs and %5 respect.",name _playerObj,name _unit,if !(isNil "_distance") then {_distance} else {floor (_unit distance _playerObj)},_moneyChange,_repChange];
{
_msg remoteExecCall ["systemChat", _x];
} forEach _members;

View File

@ -14,8 +14,9 @@ private["_result","_ammoArray"];
_result = "";
_ammoArray = getArray (configFile >> "CfgWeapons" >> _this >> "magazines");
if (count _ammoArray > 0) then {
if (count _ammoArray > 0) then
{
_result = _ammoArray select 0;
};
_result
_result

View File

@ -121,7 +121,7 @@ ___
___
# Changelog:
#### **BETA CHANGELOG** Last Updated January 6, 2015 (6:30 PM CST-America):
#### **BETA CHANGELOG** Last Updated January 9, 2016 (11:05 AM CST-America):
* **NEW CONFIG VALUES:**
DMS_MissionTimeoutResetFrequency
@ -150,13 +150,14 @@ ___
* ```_onMonitorStart``` will now run BEFORE success state is checked. As a result, I added a new "completion type" in "fn_MissionSuccessState" so that you can force mission completion via array manipulations.
* "fn_OnKilled" now gets AI side and type using "getVariable" instead of having to include them in the "addMPEventHandler". If you are using the function for custom purposes, you will need to edit your usage.
* You can now choose whether or not an AI produces different respect or tabs when roadkilled individually.
* You can now allow party members to be notified in chat when a party member kills an AI.
* You can now allow party members to be notified in chat when a party member kills an AI. It includes AI type+side, distance, and the amount of poptabs/respect received.
* You can now notify clients when AI have been offloaded to them.
* You now have greater control over AI difficulty; you can now manually define "random" presets to include/exclude special difficulty types.
* New function: "DMS_fnc_SetGroupBehavior_Separate" - You can pass an array of units and define their behavior without affecting the rest of the group.
* "DMS_fnc_SpawnAIVehicle" is overhauled: instead of only spawning a driver and a gunner, the function uses "allTurrets" to completely fill the crew of a vehicle.
* "DMS_fnc_SpawnAIVehicle" no longer sets the crew's behavior to "aware".
* Optimized "DMS_fnc_TargetsKilled".
* "DMS_explode_onRoadkill" now spawns the mine ON the player that ran the AI over, so damage to the vehicle is guaranteed no matter how fast the vehicle was going.