added new vocals for three skins (by ala)

They are played e.g. when being hit by stuff, catching fire, killing teammates, idling, trying to put a shovel into the pump, and much more!
shapetextures
David Dormagen 2015-12-16 23:00:17 +01:00
parent a8c57ea5b9
commit 7f4f5fee58
102 changed files with 91 additions and 21 deletions

View File

@ -148,7 +148,10 @@ global func FxIntIntroTimer(object target, proplist effect, int time)
if(effect.Time == 556)
{
for(var crew in effect.Players)
{
crew->Contained()->Fling(2,-2);
crew->Contained()->PlaySoundScream();
}
}
if(effect.Time == 570)

View File

@ -510,6 +510,8 @@ func FxIntWalkTimer(pTarget, effect)
var rand = Random(GetLength(Clonk_IdleActions));
PlayAnimation(Clonk_IdleActions[rand][0], CLONK_ANIM_SLOT_Movement, Anim_Linear(0, 0, GetAnimationLength(Clonk_IdleActions[rand][0]), Clonk_IdleActions[rand][1], ANIM_Remove), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
effect.idle_animation_time = Clonk_IdleActions[rand][1]-5;
if (!Random(5))
this->PlaySoundIdle();
}
}
}

View File

@ -107,15 +107,7 @@ public func Redefine(idTo)
protected func CatchBlow()
{
if (GetAction() == "Dead") return;
if (!Random(5)) Hurt();
}
protected func Hurt()
{
if(gender == 0)
Sound("Clonk::Verbal::Hurt?");
else
Sound("Clonk::Verbal::FHurt?");
if (!Random(5)) PlaySoundHurt();
}
protected func Grab(object pTarget, bool fGrab)
@ -148,12 +140,16 @@ protected func Death(int killed_by)
// Some effects on dying.
if (!this.silent_death)
{
if(gender == 0)
Sound("Clonk::Verbal::Die");
else
Sound("Clonk::Verbal::FDie");
PlaySkinSound("Die*");
DeathAnnounce();
// When killed by a team member, the other Clonk randomly plays a sound.
if (!Random(5) && killed_by != NO_OWNER && killed_by != GetOwner() && !Hostile(killed_by, GetOwner()))
{
var other_cursor = GetCursor(killed_by);
if (other_cursor)
other_cursor->~PlaySoundTaunt();
}
}
CloseEyes(1);
@ -176,6 +172,12 @@ protected func DeepBreath()
Sound("Breath");
}
public func Incineration()
{
PlaySoundShock();
return _inherited(...);
}
protected func CheckStuck()
{
// Prevents getting stuck on middle vertex
@ -648,6 +650,61 @@ func GetSkinCount() { return 4; }
func GetSkin() { return skin; }
func GetSkinName() { return skin_name; }
// Returns the skin name as used to select the right sound subfolder.
public func GetSoundSkinName()
{
if (skin_name == nil) return "Adventurer";
return skin_name;
}
public func PlaySkinSound(string sound, ...)
{
Sound(Format("Clonk::Skin::%s::%s", GetSoundSkinName(), sound), ...);
}
/*
Helper functions to play some sounds. This are encapsulated here in case sound names change.
*/
public func PlaySoundConfirm(...)
{
if (skin_name != "Farmer")
PlaySkinSound("Confirm*", ...);
}
public func PlaySoundDecline(...)
{
if (skin_name != "Farmer")
PlaySkinSound("Decline*", ...);
}
// Doubtful sound, e.g. when trying a clearly impossible action.
public func PlaySoundDoubt(...)
{
if (skin_name != "Farmer")
PlaySkinSound("Doubt*", ...);
}
public func PlaySoundHurt(...) { PlaySkinSound("Hurt*", ...); }
// Sound that is supposed to be funny in situations where the Clonk maybe did something "evil" like killing a teammate.
public func PlaySoundTaunt(...)
{
if (skin_name == "Alchemist")
PlaySkinSound("EvilConfirm*", ...);
else if (skin_name == "Steampunk")
PlaySkinSound("Laughter*", ...);
}
// Surprised sounds, e.g. when catching fire.
public func PlaySoundShock(...)
{
if (skin_name == "Steampunk" || skin_name == "Adventurer")
PlaySkinSound("Shock*", ...);
}
public func PlaySoundScream() { PlaySkinSound("Scream*"); }
// General idle sounds, played when also playing an idle animation.
public func PlaySoundIdle(...)
{
if (skin_name == "Steampunk")
PlaySkinSound("Singing*", ...);
}
//Portrait definition of this Clonk for messages
func GetPortrait()
{

View File

@ -868,8 +868,7 @@ private func OnContentsSelection(symbol, extra_data)
// Allow transfer only into containers.
if (!other_target->~IsContainer())
{
// Todo: other sound for "nope".
Sound("Hits::Materials::Metal::LightMetalHit*", nil, 10, GetController(), nil, nil, -50);
cursor->~PlaySoundDoubt(true, nil, cursor->GetOwner());
return;
}
@ -931,7 +930,7 @@ private func OnContentsSelection(symbol, extra_data)
}
else
{
Sound("Objects::Balloon::Pop", true, nil, GetOwner());
Sound("Hits::Materials::Wood::DullWoodHit*", true, nil, GetOwner());
return false;
}
}

View File

@ -83,7 +83,11 @@ public func FxControlConstructionPreviewControl(object clonk, effect, int ctrl,
// CON_Use is accept, but don't remove the preview, this is done on releasing the button.
if (ctrl == CON_Use && !release)
{
CreateConstructionSite(clonk, effect.structure, AbsX(effect.preview->GetX()), AbsY(effect.preview->GetY() + effect.preview.dimension_y/2), effect.preview.blocked, effect.preview.direction, effect.preview.stick_to);
var ok = CreateConstructionSite(clonk, effect.structure, AbsX(effect.preview->GetX()), AbsY(effect.preview->GetY() + effect.preview.dimension_y/2), effect.preview.blocked, effect.preview.direction, effect.preview.stick_to);
if (ok)
clonk->~PlaySoundConfirm();
else
clonk->~PlaySoundDecline();
return true;
}
// movement is allowed

Some files were not shown because too many files have changed in this diff Show More