Creatures and Attack sounds: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Created page with "In the Combat_Montage of our player character, we have the attack animation. In the attack animation segment we have one events (Notify) at the start of type PSAnimNotifyAttackSound File:PSAnimNotify.png In psAttack::Attack() we create a soundID = <race id (without gender)> - <Weapon skill> Example: Stonehammer hitting with a Fist = 0-4 this soundID is then sent to all clients this way: we call BroadcastAttackAnimation() to send it to all players in range, and..."
 
No edit summary
Line 1: Line 1:
In the Combat_Montage of our player character, we have the attack animation. In the attack animation segment we have one events (Notify) at the start of type PSAnimNotifyAttackSound  
== Attack Sound ==
Can be done in two ways:
 
1) For humanoid character that can switch weapons. In the Combat_Montage of our player character, we have the attack animation. In the attack animation segment we have one events (Notify) at the start of type PSAnimNotifyAttackSound  


[[File:PSAnimNotify.png]]
[[File:PSAnimNotify.png]]
Line 12: Line 15:
Inside PlayPSAnimMontage() we use the soundid
Inside PlayPSAnimMontage() we use the soundid


UPSAnimNotifyAttackSound: <Race of Attacker> + "-" + <Weapon Type>
The class used is UPSAnimNotifyAttackSound
 
2) For creatures than cannot swap weapons we just add the sound in the attack animation.
 
[[File:Trepor attack sound.png]]


== Hit sound ==
When someone is hit.
in psAttack::AffectTarget() we create a soundID <Weapon Type> + "-" + <Material>
Material is defined in [[Race infoTable]].skintype
this soundID is then sent to all clients this way: we call BroacastCombatResult() to send it to all players in range, and then we call ReceiveCombatResult() on clients BP, this is then calling PlayPSAnimMontage()


In the Combat_Montage of the hit creature , example the trepor, we have one in the Hit animation of type PSAnimNotifyCombatResultSound
In the Combat_Montage of the hit creature , example the trepor, we have one in the Hit animation of type PSAnimNotifyCombatResultSound
Line 19: Line 34:
[[File:PSAnimCombatResults.png]]
[[File:PSAnimCombatResults.png]]


The class used is  UPSAnimNotifyCombatResultSound
== Death Sound ==
If we want to have a sound when the creature dies, we have it in the Death Montage, on the death animation


UPSAnimNotifyCombatResultSound: <Weapon Type> + "-" + <Material> / Hit or Block
[[File:Death Sound.png]]

Revision as of 22:11, 19 June 2023

Attack Sound

Can be done in two ways:

1) For humanoid character that can switch weapons. In the Combat_Montage of our player character, we have the attack animation. In the attack animation segment we have one events (Notify) at the start of type PSAnimNotifyAttackSound


In psAttack::Attack() we create a soundID = <race id (without gender)> - <Weapon skill>

Example: Stonehammer hitting with a Fist = 0-4

this soundID is then sent to all clients this way: we call BroadcastAttackAnimation() to send it to all players in range, and then we call ReceiveAttackAnimation() on clients BP, this is then calling PlayPSAnimMontage()

Inside PlayPSAnimMontage() we use the soundid

The class used is UPSAnimNotifyAttackSound

2) For creatures than cannot swap weapons we just add the sound in the attack animation.

Hit sound

When someone is hit.

in psAttack::AffectTarget() we create a soundID <Weapon Type> + "-" + <Material>

Material is defined in Race infoTable.skintype

this soundID is then sent to all clients this way: we call BroacastCombatResult() to send it to all players in range, and then we call ReceiveCombatResult() on clients BP, this is then calling PlayPSAnimMontage()

In the Combat_Montage of the hit creature , example the trepor, we have one in the Hit animation of type PSAnimNotifyCombatResultSound

The class used is UPSAnimNotifyCombatResultSound

Death Sound

If we want to have a sound when the creature dies, we have it in the Death Montage, on the death animation