Originally Posted by
G-Stuff002
I begin to disassemble this mod, its differently have this grenade is no possibility. As an experiment i deleted
moke_grenade_german_mp2,
smoke_grenade_german_mp,
GASGrenadeallies_mp,
GASGrenadeaxis_mp
and gas grenede STILL work in game, I think it's in scripts who are responsible for this.
I look in _weapons.gsc but not find script responsible for function
This is IWD have all folders and files for grenade but without script for damage
https://drive.google.com/open?id=1dD...4YFjg1fD2fYGRq
The GSC file that handles mustard gas damage is in _mc2\_mc2_mcFX:
Allies:
Code:
_mc2\_mc2_mcFX::AlliedMonitorMustardGas();
Code:
_mc2\_mc2_mcFX::AlliedGasPlayer();
Axis:
Code:
_mc2\_mc2_mcFX::AxisMonitorMustardGas();
Code:
_mc2\_mc2_mcFX::AxisGasPlayer();
There are 2 weapon files:
And both the weapon files use a single FX file:
Code:
fx\impacts\mustard_blast.efx
I've no idea why they have four functions handling the damage. From what I've seen, the only difference between them is the name of the sWeapon. But you can handle that by stipulating the different names based on team:
Code:
monitorMustardGas( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{
self endon("TimeToDie");
self endon("disconnect");
//PLAY EFFECT FOR 15 SECONDS
gastime = 10;
for(j = 0;j <= gastime;j++)
{
//LOOP THROUGH PLAYERS AND DETERMINE WHO IS IN RANGE
players = getentarray("player", "classname");
for(i=0;i<players.size;i++)
{
dst = distance(vPoint, players[i].origin);
//AREA WHICH PLAYER WILL BE AFFECTED EXPANDS
//ALONG WITH THE GAS/SMOKE (~2ft per sec)
if( dst > 200 + (j * 20) || players[i].sessionstate != "playing" || !isAlive(players[i]) )
continue;
//DAMAGE THE PLAYER
pcnt = 200 + (j * 20);
if(dst > pcnt * .75 ) // 0-25% dmg
iDamage = randomint(5);
else if(dst > pcnt * .5 && dst < pcnt * .75) // 25-50 % dmg
iDamage = 15 + randomint(5);
else if(dst > pcnt *.25 && dst < pcnt * .5) // 59-75% dmg
iDamage = 30 + randomint(5);
else if(dst < pcnt * .25) // 100% dmg
iDamage = 45 + randomint(5);
//vDir = undefined;
//SET THE MOD
sMeansOfDeath = "MOD_UNKNOWN";
// SET THE WEAPON TO "NONE" SO THE DAMAGE CALLBACK
// DOESNT PICK IT BACK UP AND RESTART THE THREAD
if( eAttacker.pers["team"] == "axis" )
sWeapon = "alliedgas_mp";
else
sWeapon = "axisgas_mp";
iDFlags = 1;
players[i] thread AlliedGasPlayer(eAttacker, eAttacker, iDamage, iDFlags , sMeansOfDeath , sWeapon, vPoint , undefined,"none",psOffsetTime);
}
wait(1);
}
}