Blockland Forums > Modification Help
How to make spear to stick into bricks?
Pages: (1/1)
superluigi123:
Hello.
I am working on making spear stick into wall. (I am a newbie at making addons.) Can someone tell me how?
my try:
//projectile
AddDamageType("JavelinDirect", '<bitmap:add-ons/Weapon_Javelin/CI_javelin> %1', '%2 <bitmap:add-ons/Weapon_Javelin/CI_javelin> %1',1,1);
AddDamageType("JavelinRadius", '<bitmap:add-ons/Weapon_Javelin/CI_javelinRadius> %1', '%2 <bitmap:add-ons/Weapon_Javelin/CI_javelinRadius> %1',1,0);
datablock ProjectileData(javelinProjectile)
{
projectileShapeName = "./javelinProjectile.dts";
directDamage = 50;
directDamageType = $DamageType::JavelinDirect;
radiusDamageType = $DamageType::JavelinRadius;
impactImpulse = 1000;
verticalImpulse = 1000;
explosion = spearExplosion;
particleEmitter = spearTrailEmitter;
brickExplosionRadius = 0;
brickExplosionImpact = true; //destroy a brick if we hit it directly?
brickExplosionForce = 20;
brickExplosionMaxVolume = 200;
brickExplosionMaxVolumeFloati ng = 200;
muzzleVelocity = 50;
velInheritFactor = 1;
armingDelay = 0;
lifetime = 20000;
fadeDelay = 19500;
isBallistic = true;
bounceAngle = 170; //stick almost all the time
minStickVelocity = 10;
bounceElasticity = 0.2;
bounceFriction = 0.01;
gravityMod = 0.50;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
uiName = "Javelin";
Renamed to javelin cause Spear is already made and overwrites edited spear.
Cell603:
--- Quote ---datablock ProjectileData(arrowProjectile)
{
projectileShapeName = "./arrow.dts";
directDamage = 30;
directDamageType = $DamageType::ArrowDirect;
radiusDamage = 0;
damageRadius = 0;
radiusDamageType = $DamageType::ArrowDirect;
explosion = arrowExplosion;
stickExplosion = arrowStickExplosion;
bloodExplosion = arrowStickExplosion;
particleEmitter = arrowTrailEmitter;
explodeOnPlayerImpact = true;
explodeOnDeath = true;
armingDelay = 4000;
lifetime = 4000;
fadeDelay = 4000;
isBallistic = true;
bounceAngle = 170; //stick almost all the time
minStickVelocity = 10;
bounceElasticity = 0.2;
bounceFriction = 0.01;
gravityMod = 0.25;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
muzzleVelocity = 65;
velInheritFactor = 1;
uiName = "Arrow";
};
--- End quote ---
Here is the projectile data used by the default bow. Just match your projectile data with this, you should get the effect you want.
superluigi123:
--- Quote from: Cell603 on June 07, 2012, 01:31:56 PM ---Here is the projectile data used by the default bow. Just match your projectile data with this, you should get the effect you want.
--- End quote ---
Thx alot, made it
Treynolds416:
That's not all you have to do, you need to add an arming delay. You should also set brickExplosionImpact to false, you don't want it trying to stick to bricks it has destroyed.
Cell603:
--- Quote ---That's not all you have to do, you need to add an arming delay. You should also set brickExplosionImpact to false, you don't want it trying to stick to bricks it has destroyed.
--- End quote ---
Listen to him since I don't know much about weapon addons.
Pages: (1/1)