Landing sound

1.There is no sound when landing, can I set the landing sound?

2.I added the stamina Attribute, I want it to perform death state at <=0, just like the death state when Health<=0.

I tried to execute in Update():

If (hungryAttribute.Value <= 0)
{
CharacterHealth.ImmediateDeath();
}

But after the character is born again, the health is still 0, and he will continue to play the death animation.

3.How to prevent an item from using the aiming function? (right click zoom)
 
Last edited:
1. There is a sound specified within the demo scene - this is set using the Land Surface Impact on the Fall ability.

2. How are you respawning the character? Health.OnRespawn will be called if you are using the respawning system and this will reset the health.

3. You want to disable zooming when you have a specific weapon equipped? You can do so by using the state system to prevent the camera from allowing to zoom (similar to how dual pistols is setup).
 
1.3. I got them.

2.I'm using the respawning system.

I found that I need to add some stamina to the character after It dies, otherwise Its stamina value will always be equal to 0. This will cause the death animation to play all the time.

In other words, I need to add some stamina value to the character when it is reborn. Which method should I add this code to?
 
Can you reproduce it within the demo scene? The demo scene doesn't have any stamina so it should be a similar comparison.
 
Can you reproduce it within the demo scene? The demo scene doesn't have any stamina so it should be a similar comparison.
Yes, this is a modified demo scene. Wait for Stamina to become 0 after opening the scene, then the character will repeat the death animation.
 

Attachments

  • Test_StaminaScene.zip
    459.5 KB · Views: 1
Top