Blockland Forums > Modification Help

Checking For Death by explosion

Pages: << < (2/5) > >>

Swollow:

How am I supposed to check if %type is equal to something like radiusdamage anyway? It doesn't make sense to directly type in if(%type == radiusdamage)
or "radiusdamage" can anyone help me out? :|

Headcrab Zombie:

Package onDeath to echo %type
Get killed by an explosion
Check console
Package onDeath - if(%type $= "whatever console output is")

Except I think the types are weapon specific, and not just a general 'radius damage'

Swollow:

Well apparently you can't use %type to check for the type of death because no matter what every time you die the "type" of death is Body every time  you die I tried letting myself get shot to death in areas like the head to and it yielded same results there must be another way to check for death by radius damage. :|

Greek2me:

That's what %area should be. That'd mean that some of the arguments I gave you are messed up OR your function is messed up. Could you post your function?

In addition, add this to your function:

--- Code: ---echo(%client TAB %obj TAB %killer TAB %type TAB %area);
--- End code ---
Then test it out again and tell us what the console says.

Swollow:

I shot myself with a rocketlauncher at my feet
it says
Body (from the echo Headcrab Zombie said)
8245^6701^14^Body

--- Code: ---package bloodbath
{
function GameConnection::onDeath(%this,%client,%obj,%killer,%type,%area)
{

echo(%type);
echo(%client TAB %obj TAB %killer TAB %type TAB %area);
%cp=%this.player;
%cp.mountImage(BleedImage,0);
%p = new projectile()
{
dataBlock = GoryDeathExplosionProjectile;
scale = ("0.5 0.5 0.5");
initialVelocity = ("0 0 0");
initialPosition = %cp.getPosition();
sourceObject = %cp;
sourceSlot = 0;
client = %this;
};






Parent::OnDeath(%this,%client,%obj,%killer,%type,%area);
}
};
activatePackage(bloodbath);
--- End code ---


Pages: << < (2/5) > >>

Go to full version