Opened 4 years ago

Last modified 5 months ago

#5856 new defect

Improving Impact Sounds — at Version 2

Reported by: Stan Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Stan)

Currently no matter whether the projectile actually hits its target or what the target actually is, a generic impact sound is played.

It would be nice if the sound played was different depending on the target nature, and whether it actually hit it or not.

To do so, one needs to do the following.

Move sound handling to MissileHit instead of doing it in UnitAI.

Currently we already know what sound we are gonna be playing when we set the callback for MissileHit. Instead of the sound, we should pass the id of the sending entity (to know what weapon was used) so that we can play different variants, depending on whether we hit the target and what the target is. For that I propose to use classes.

For the Organic class we should have three cases

  • Unit has no armor → "attack_impact_" + type.toLowerCase()+ "_flesh"
  • Unit has metal armor → "attack_impact_" + type.toLowerCase()+ "_metal"
  • Unit was missed → "attack_impact_" + type.toLowerCase()"

We could therefore add a armored class.

For the Structure class we could have two cases

  • Building is hit → "attack_impact_" + type.toLowerCase()+ "_stone"
  • Building was missed → "attack_impact_" + type.toLowerCase()"

For the Ship class we could have two cases

  • Building is hit → "attack_impact_" + type.toLowerCase()+ "_wood"
  • Building was missed → "attack_impact_" + type.toLowerCase()"

Change History (2)

comment:1 by Stan, 4 years ago

Description: modified (diff)

comment:2 by Stan, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.