stalactite: added sound for dropping water and sound/particles for hit

lights3
David Dormagen 2015-08-27 21:12:27 +02:00
parent 250a20ccfc
commit 06df6885ce
6 changed files with 28 additions and 2 deletions

View File

@ -20,10 +20,30 @@ public func Construction()
transformation = Trans_Rotate(RandomX(-20, 20), 0, 0, 1);
sibling = TransformBone(bone, transformation, 1, Anim_Const(1000), sibling);
}
AddTimer("DoWaterdrop", RandomX(36 * 10, 36 * 40));
}
private func Hit()
{
var colour = GetClrModulation();
var particles =
{
Size = PV_KeyFrames(0, 0, 0, 100, PV_Random(3, 5), 1000, 3),
R = (colour >> 16) & 0xff,
G = (colour >> 8) & 0xff,
B = (colour >> 0) & 0xff,
Alpha = PV_Linear(255, 0),
ForceY = PV_Gravity(100),
CollisionVertex = 0
};
var width = GetCon() * 7 / 100;
var height = GetCon() * 60 / 100;
if (GetR() != 0) height *= -1;
CreateParticle("SmokeDirty", PV_Random(-width, width), PV_Random(0, height), PV_Random(-5, 5), PV_Random(-5, 15), PV_Random(10, 60), particles, 200);
Sound("Rockfall*");
RemoveObject();
return true;
}
@ -44,7 +64,7 @@ public func Place(int amount, proplist rectangle, proplist settings)
var stalactites = [];
for (var i = 0; i < amount; i++)
{
var loc = FindLocation(Loc_Tunnel(), Loc_Not(Loc_Liquid()), Loc_Wall(CNAT_Top), Loc_Space(40, true), loc_area);
var loc = FindLocation(Loc_Tunnel(), Loc_Not(Loc_Liquid()), Loc_Wall(CNAT_Top), Loc_Space(40, CNAT_Bottom), loc_area);
if (!loc)
continue;
var mat = MaterialName(GetMaterial(loc.x, loc.y - 1));
@ -145,5 +165,11 @@ private func DrawWaterSource()
}
}
private func DoWaterdrop()
{
if (Random(9)) return;
Sound("Waterdrop*");
}
local Name = "$Name$";
local Description = "$Description$";

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ Author Work(s)
Ringwaul - MonsterGrowl*, MonsterDie, Snuff*, WipfAroof, WipfWhine
Clonkonaut - Confirm*, FDie
Checkmaty - ProjectileHitLiving*
ala - Zap1-4, GlassBreak
ala - Zap1-4, GlassBreak, Rockfall1-2, Waterdrop1-2
dobroide - BirdsLoop (http://www.freesound.org/people/dobroide/sounds/54746/)
Benboncan - Blast*/BlastMetal (http://www.freesound.org/people/Benboncan/sounds/73005/)
Stickinthemud - Clonk (http://www.freesound.org/people/Stickinthemud/sounds/27526/)