Blockland Forums > Modification Help
Projectile questions
Demian:
--- Quote from: Bauklotz on December 29, 2010, 03:16:27 PM ---
--- Code: ---function projectileName::onCollision(%this,%obj,%col) {
if(%col.getClassName() $= fxDTSBrick)
%col.fakeKillBrick(%obj.getVelocity(), duration in seconds);
}
--- End code ---
--- End quote ---
Is it possible to make that use the minigame settings? I just want the projectile to fakekill bricks normally like the rocket launcher would but without and explosion just by hitting the brick.
Bauklotz:
--- Quote from: Demian on December 29, 2010, 04:32:39 PM ---Is it possible to make that use the minigame settings? I just want the projectile to fakekill bricks normally like the rocket launcher would but without and explosion just by hitting the brick.
--- End quote ---
--- Code: ---package minigameProjFakeBricks {
function ProjectileData::onCollision(%this,%obj,%col) {
if(isObject(%obj.client.miniGame) && minigameCanDamage(%obj,%col) && %col.getClassName() $= fxDTSBrick && (%col.getGroup().getId() == %obj.client.miniGame.owner.brickGroup.getId() || %obj.client.miniGame.useAllPlayersBricks))
%col.fakeKillBrick(%obj.getVelocity(),%obj.client.miniGame.brickRespawnTime / 1000);
else
Parent::onCollision(%this,%obj,%col);
}
};
activatePackage(minigameProjFakeBricks);
--- End code ---
Destiny/Zack0Wack0:
--- Code: --- brickExplosionRadius = 1;
brickExplosionImpact = true; //destroy a brick if we hit it directly?
brickExplosionForce = 3;
brickExplosionMaxVolume = 15; //max volume of bricks that we can destroy
brickExplosionMaxVolumeFloating = 30; //max volume of bricks that we can destroy if they aren't connected to the ground (should always be >= brickExplosionMaxVolume)
--- End code ---
Demian:
--- Quote from: Destiny/Zack0Wack0 on December 30, 2010, 05:21:57 AM ---
--- Code: --- brickExplosionRadius = 1;
brickExplosionImpact = true; //destroy a brick if we hit it directly?
brickExplosionForce = 3;
brickExplosionMaxVolume = 15; //max volume of bricks that we can destroy
brickExplosionMaxVolumeFloating = 30; //max volume of bricks that we can destroy if they aren't connected to the ground (should always be >= brickExplosionMaxVolume)
--- End code ---
--- End quote ---
But that doesn't destroy 64x cubes.
Space Guy:
Change the max volume, then.