Opened 3 years ago
Last modified 5 months ago
#5856 new defect
Improving Impact Sounds
Reported by: | Stan | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description (last modified by )
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 (7)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Description: | modified (diff) |
---|
comment:3 by , 3 years ago
comment:7 by , 5 months ago
This is certainly worth pursuing. Making the sound based on the impacted object instead of the attacking object is how it should be.
Though, I feel like Structures could have two cases: _stone and _wood.
In 24582: